Version Description
Give version 1.8 is a major update. Please make sure you make a backup of your database before updating.
Download this release
Release Info
Developer | dlocc |
Plugin | Give – Donation Plugin and Fundraising Platform |
Version | 1.8.15 |
Comparing to | |
See all releases |
Code changes from version 1.8.14 to 1.8.15
- assets/js/admin/admin-scripts.js +2 -0
- assets/js/admin/admin-scripts.min.js +2 -2
- give.php +3 -3
- includes/actions.php +64 -35
- includes/admin/class-addon-activation-banner.php +1 -1
- includes/admin/class-i18n-module.php +1 -1
- includes/admin/payments/class-payments-table.php +1 -1
- includes/admin/tools/data/class-give-tools-recount-income.php +1 -1
- includes/admin/tools/import/class-give-import-donations.php +64 -48
- includes/admin/tools/logs/class-sales-logs-list-table.php +1 -1
- includes/class-give-html-elements.php +1 -1
- includes/class-give-license-handler.php +29 -26
- includes/class-give-session.php +1 -1
- includes/class-notices.php +4 -4
- includes/deprecated/deprecated-functions.php +35 -0
- includes/formatting.php +135 -73
- includes/forms/template.php +2 -2
- includes/gateways/manual.php +1 -1
- includes/gateways/offline-donations.php +1 -1
- includes/gateways/paypal-standard.php +1 -1
- includes/import-functions.php +12 -4
- includes/misc-functions.php +378 -70
- includes/payments/class-give-payment.php +21 -21
- includes/payments/class-payment-stats.php +1 -1
- includes/payments/functions.php +12 -3
- includes/process-donation.php +37 -37
- includes/scripts.php +1 -1
- includes/shortcodes.php +16 -1
- languages/give.pot +182 -170
- readme.txt +8 -1
- templates/history-donations.php +141 -61
assets/js/admin/admin-scripts.js
CHANGED
@@ -966,6 +966,8 @@ var give_setting_edit = false;
|
|
966 |
});
|
967 |
self.process_step(parseInt(response.step), data, self);
|
968 |
}
|
|
|
|
|
969 |
}
|
970 |
}).fail(function (response) {
|
971 |
/**
|
966 |
});
|
967 |
self.process_step(parseInt(response.step), data, self);
|
968 |
}
|
969 |
+
// Reset the form for preventing multiple ajax request.
|
970 |
+
$('#give-tools-recount-form')[0].reset();
|
971 |
}
|
972 |
}).fail(function (response) {
|
973 |
/**
|
assets/js/admin/admin-scripts.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
function give_render_responsive_tabs(){var e=jQuery(".give-settings-page"),t=jQuery(".give-nav-tab-wrapper"),i=e.width(),n=jQuery(".give-sub-nav-tab-wrapper"),a=jQuery("nav",n),o=jQuery(".give-nav-tab-wrapper>a:not(give-not-tab)"),s=[],r=[],d=0;if(600<jQuery(window).outerWidth()&&(d=200),!e.length)return!1;t.css({height:"auto",overflow:"visible"}),o.removeClass("give-hidden");var c=new Promise(function(e,t){jQuery.each(o,function(e,t){t=jQuery(t),d+=parseInt(t.outerWidth()),d<i?s.push(t):r.push(t)}),e(!0)});c.then(function(e){if(r.length&&-1!=window.location.search.indexOf("&tab=")){var i={},o=get_url_params();r=r.filter(function(e){var t=-1!=parseInt(e.attr("href").indexOf("&tab="+o.tab));return t&&(i=e),!t}),i.length&&(r.unshift(s.pop()),s.push(i))}var d=new Promise(function(e,t){s.length&&jQuery.each(s,function(e,t){t=jQuery(t),t.hasClass("give-hidden")&&t.removeClass("give-hidden")}),e(!0)});d.then(function(e){r.length?(a.html(""),jQuery.each(r,function(e,t){t=jQuery(t),t.addClass("give-hidden"),t.clone().removeClass().appendTo(a)}),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(n),n.show()):n.hide()})})}function get_url_params(){for(var e,t=[],i=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),n=0;n<i.length;n++)e=i[n].split("="),t[e[0]]=e[1];return t}function give_on_donation_import_start(){give_on_donation_import_ajax()}function give_on_donation_import_ajax(){var e=jQuery("form.tools-setting-page-import");give_setting_edit=!0;var t=e.find(".give-progress"),i=jQuery(t).data("total_ajax"),n=jQuery(t).data("current"),a=jQuery(t).data("start"),o=jQuery(t).data("end"),s=jQuery(t).data("next"),r=jQuery(t).data("total"),d=jQuery(t).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:give_vars.give_donation_import,total_ajax:i,current:n,start:a,end:o,next:s,total:r,per_page:d,fields:e.serialize()},dataType:"json",success:function(e){jQuery(t).data("current",e.current),jQuery(t).find("div").width(e.percentage+"%"),1==e.next?(jQuery(t).data("start",e.start),jQuery(t).data("end",e.end),1==e.last&&jQuery(t).data("next",!1),give_on_donation_import_ajax()):(give_setting_edit=!1,window.location=e.url)},error:function(){give_setting_edit=!1,alert(give_vars.error_message)}})}jQuery.noConflict();var give_setting_edit=!1;!function(e){function t(e,t){return e=accounting.unformat(e,give_vars.decimal_separator).toString(),t="undefined"!==t&&t,e=!1!==t?parseFloat(e).toFixed(t):parseFloat(e).toFixed(give_vars.currency_decimals)}var i=function(){e("body").on("click","button.notice-dismiss",function(){"give-invalid-license"!==jQuery(this).closest("div.give-notice").data("notice-id")&&n()})},n=function(){var e="give-message",t=document.location.href,i=t.split("?");if(i.length>=2){for(var n=i.shift(),a=i.join("?"),o=encodeURIComponent(e)+"=",s=a.split(/[&;]/g),r=s.length;r-- >0;)s[r].lastIndexOf(o,0)!==-1&&s.splice(r,1);t=n+"?"+s.join("&"),window.history.pushState("",document.title,t)}return t},a=function(){if(e(".give_datepicker").length>0){var t="mm/dd/yy";e(".give_datepicker").datepicker({dateFormat:t})}},o=function(){jQuery("body.post-type-give_forms").length>0&&(window.addEventListener("beforeunload",function(e){var t=give_vars.setting_not_save_message;if(give_setting_edit)return(e||window.event).returnValue=t,t}),jQuery("body").on("click",".give-save-button",function(){give_setting_edit=!1}))},s=function(){if(jQuery("body.give_forms_page_give-settings").length>0){var e=jQuery("body.give_forms_page_give-settings #give-mainform").serialize();jQuery(".give-settings-page").on("change keyup blur","form",function(t){var i=jQuery("body.give_forms_page_give-settings #give-mainform").serialize();give_setting_edit=e!=i})}},r=function(){var t=e(".give-select-chosen");t.on("chosen:ready",function(){e(this).next(".chosen-container").find("input.chosen-search-input").after('<span class="spinner"></span>')}),t.on("chosen:no_results",function(){var t=e(this).next(".chosen-container"),i=t.find("li.no-results"),n="";n=t.hasClass("give-select-chosen-ajax")&&i.length?give_vars.chosen.ajax_search_msg.replace("{search_term}",'"'+e("input",t).val()+'"'):give_vars.chosen.no_results_msg.replace("{search_term}",'"'+e("input",t).val()+'"'),i.html(n)}),t.chosen({inherit_select_classes:!0,placeholder_text_single:give_vars.one_option,placeholder_text_multiple:give_vars.one_or_more_option}),e("#post").on("click",".give-thickbox",function(){e(".give-select-chosen","#choose-give-form").css("width","100%")});var i,n=342;e(document.body).on("keyup",".give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input",function(t){var a=e(this).val(),o=e(this).closest(".give-select-chosen"),s=o.prev(),r=o.find('input[type="text"]'),d=(o.hasClass("variations"),t.which),c="give_forms_search";if(o.prev().data("search-type")){if("no_ajax"===s.data("search-type"))return;c="give_"+s.data("search-type")+"_search"}a.length<=3||!c.length||9===d||13===d||16===d||17===d||18===d||19===d||20===d||27===d||33===d||34===d||35===d||36===d||37===d||38===d||39===d||40===d||44===d||45===d||144===d||145===d||91===d||93===d||224===d||112<=d&&123>=d||(clearTimeout(i),o.addClass("give-select-chosen-ajax"),i=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:c,s:a},dataType:"json",beforeSend:function(){s.closest("ul.chosen-results").empty(),r.prop("disabled",!0)},success:function(t){o.removeClass("give-select-chosen-ajax"),e("option:not(:selected)",s).remove(),t.length?(e.each(t,function(t,i){e('option[value="'+i.id+'"]',s).length||s.prepend('<option value="'+i.id+'">'+i.name+"</option>")}),o.prev("select.give-select-chosen").trigger("chosen:updated")):o.prev("select.give-select-chosen").trigger("chosen:no_results"),r.prop("disabled",!1),r.val(a).focus()}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){r.prop("disabled",!1)})},n))}),e(".give-select-chosen .chosen-search input").each(function(){var t=e(this).parent().parent().parent().prev("select.give-select-chosen").data("search-type"),i="";"form"===t?i=give_vars.search_placeholder:(t="search_placeholder_"+t,give_vars[t]&&(i=give_vars[t])),e(this).attr("placeholder",i)})},d={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){e("body").on("click",".delete-single-donation",function(){return confirm(give_vars.delete_payment)})},resendSingleDonationReceipt:function(){e("body").on("click",".resend-single-donation-receipt",function(){return confirm(give_vars.resend_receipt)})}},c={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"},e.post(ajaxurl,data,function(i){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden");var n=e("#give-order-address-state-wrap");n.find("*").not(".order-data-address-line").remove(),void 0!=typeof i.states_found&&1==i.states_found?(n.append(i.data),n.find("select").chosen()):(n.append('<input type="text" name="give-payment-address[0][state]" value="'+i.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!=typeof i.show_field&&0==i.show_field&&t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"))}),!1})},add_note:function(){e("#give-add-payment-note").on("click",function(t){t.preventDefault();var i={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#give-payment-note").val()};if(i.note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#give-payment-note").css("border-color");e("#give-payment-note").css("border-color","red"),setTimeout(function(){e("#give-payment-note").css("border-color",n)},500)}})},remove_note:function(){e("body").on("click",".give-delete-payment-note",function(t){if(t.preventDefault(),confirm(give_vars.delete_payment_note)){var i={action:"give_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){return e("#give-payment-note-"+i.note_id).remove(),e(".give-payment-note").length||e(".give-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},new_donor:function(){e("#give-donor-details").on("click",".give-payment-new-donor, .give-payment-new-donor-cancel",function(t){t.preventDefault(),e(".donor-info").toggle(),e(".new-donor").toggle(),e(".new-donor").is(":visible")?e("#give-new-donor").val(1):e("#give-new-donor").val(0)})},resend_receipt:function(){e("body").on("click","#give-resend-receipt",function(e){return confirm(give_vars.resend_receipt)})},variable_price_list:function(){e("#give_payment_form_select").chosen().change(function(){var t,i=e(".give-donation-level");return!!(t=e(this).val())&&(!!i.length&&void e.ajax({type:"POST",url:ajaxurl,data:{form_id:t,payment_id:e('input[name="give_payment_id"]').val(),action:"give_check_for_form_price_variations_html"},success:function(t){t=t.trim(),t?(i.html(t),e('select[name="give-variable-price"]').chosen().change()):i.html("")}}))}),e("#give-donation-overview").on("change",'select[name="give-variable-price"]',function(){var t=jQuery(this).data("prices"),i=e("#give-payment-total");e(this).val()in t&&(i.val(t[e(this).val()]).css("background-color","yellow"),window.setTimeout(function(){i.css("background-color","white")},1e3))})}},l={init:function(){this.setting_change_country(),this.toggle_options(),this.main_setting_update_notice(),this.verify_settings()},setting_change_country:function(){e('select[name="base_country"]').change(function(){var t=e(this),i={action:"give_get_states",country:t.val(),field_name:"base_state"};return e.post(ajaxurl,i,function(n){t.closest("tr").next().show(),void 0!=typeof n.states_found&&1==n.states_found?e(':input[name="base_state"]').replaceWith(n.data):(void 0!=typeof n.show_field&&0==n.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith('<input type="text" name="'+i.field_name+'" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'))}),!1})},toggle_options:function(){var t=e('input[name="email_access"]',".give-setting-tab-body-general");t.on("change",function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val();"enabled"===t?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())}).change();var i=e('input[name="form_featured_img"]',".give-setting-tab-body-display");i.on("change",function(){var t=e('input[name="form_featured_img"]:checked',".give-setting-tab-body-display").val();"enabled"===t?e("#featured_image_size").parents("tr").show():e("#featured_image_size").parents("tr").hide()}).change();var n=e('input[name="terms"]',".give-setting-tab-body-display");n.on("change",function(){var t=e('input[name="terms"]:checked',".give-setting-tab-body-display").val();"enabled"===t?(e("#agree_to_terms_label").parents("tr").show(),e("#wp-agreement_text-wrap").parents("tr").show()):(e("#agree_to_terms_label").parents("tr").hide(),e("#wp-agreement_text-wrap").parents("tr").hide())}).change();var a=e('input[name="admin_notices"]',".give-setting-tab-body-emails");a.on("change",function(){var t=e('input[name="admin_notices"]:checked',".give-setting-tab-body-emails").val();"enabled"===t?(e("#donation_notification_subject").parents("tr").show(),e("#wp-donation_notification-wrap").parents("tr").show(),e("#admin_notice_emails").parents("tr").show()):(e("#donation_notification_subject").parents("tr").hide(),e("#wp-donation_notification-wrap").parents("tr").hide(),e("#admin_notice_emails").parents("tr").hide())}).change()},main_setting_update_notice:function(){var t=e("#setting-error-give-setting-updated");t.length&&window.setTimeout(function(){t.slideUp()},5e3)},verify_settings:function(){var t=e("#success_page"),i=e("#failure_page");t.add(i).change(function(){if(t.val()===i.val()){var n='<div id="setting-error-give-matched-success-failure-page" class="updated settings-error notice is-dismissible"> <p><strong>'+give_vars.matched_success_failure_page+'</strong></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+give_vars.dismiss_notice_text+"</span></button> </div>",a=e("#setting-error-give-matched-success-failure-page");if(e(this).val(""),a.length)return!1;e("h1","#give-mainform").after(n),a=e("#setting-error-give-matched-success-failure-page"),e(".notice-dismiss",a).click(function(){a.remove()})}}).change()}},v={init:function(){this.date_options(),this.donors_export(),this.recount_stats()},date_options:function(){e("#give-graphs-date-options").change(function(){var t=e(this);"other"===t.val()?e("#give-date-range-options").show():e("#give-date-range-options").hide()})},donors_export:function(){e("#give_donor_export_form").change(function(){var t=e(this),i=e("option:selected",t).val(),n=e("#give_customer_export_option");"0"===t.val()?n.show():n.hide();var a=e(".give_price_options_select");if(0!=parseInt(i)){var o={action:"give_check_for_form_price_variations",form_id:i,all_prices:!0};e.post(ajaxurl,o,function(t){a.remove(),e("#give_donor_export_form_chosen").after(t)})}else a.remove()})},recount_stats:function(){e("body").on("change","#recount-stats-type",function(){var t=e("#give-tools-recount-form"),i=e("option:selected",this).data("type"),n=e("#recount-stats-submit"),a=e(".tools-form-dropdown");if(t.find(".notice-wrap").remove(),n.removeClass("button-disabled").attr("disabled",!1),a.hide(),e(".give-recount-stats-descriptions span").hide(),"reset-stats"===i){t.append('<div class="notice-wrap"></div>');var o=t.find(".notice-wrap");o.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.reset_stats_warn+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-test-donors"===i){t.append('<div class="notice-wrap"></div>');var o=t.find(".notice-wrap");o.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_test_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-import-donors"===i){t.append('<div class="notice-wrap"></div>');var o=t.find(".notice-wrap");o.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_import_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else a.hide(),a.val(0);current_forms=e(".tools-form-dropdown-"+i),current_forms.show(),current_forms.find(".give-select-chosen").css({width:"auto","min-width":"250px"}),e("#"+i).show()}),e("body").on("change","#confirm-reset",function(){var t=e(this).is(":checked");t?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),e("#give-tools-recount-form").submit(function(t){var i=e("#recount-stats-type").val(),n=e(this),a=e("option:selected",this).data("type");if("reset-stats"===a){var o=e("#confirm-reset").is(":checked");if(o)return!0;r=!0}n.find(".notice-wrap").remove(),n.append('<div class="notice-wrap"></div>');var s=n.find(".notice-wrap"),r=!1;if(null!==i&&0!==i||(s.html('<div class="updated error"><p>'+give_vars.batch_export_no_class+"</p></div>"),r=!0),"recount-form"===a){var d=e('select[name="form_id"]').val();0==d&&(s.html('<div class="updated error"><p>'+give_vars.batch_export_no_reqs+"</p></div>"),r=!0)}if(r)return n.find(".button-disabled").removeClass("button-disabled"),!1})}},u={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".give-export-form",function(i){i.preventDefault();var n=e(this).find('input[type="submit"]');if(!n.hasClass("button-disabled")){var a=e(this).serialize();n.addClass("button-disabled"),e(this).find(".notice-wrap").remove(),e(this).append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.process_step(1,a,t)}})},process_step:function(t,i,n){give_setting_edit=!0,e.ajax({type:"POST",url:ajaxurl,data:{form:i,action:"give_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){give_setting_edit=!1;var a=e(".give-export-form").find(".give-progress").parent().parent(),o=a.find(".notice-wrap");if(a.find(".button-disabled").removeClass("button-disabled"),t.error){var s=t.message;o.html('<div class="updated error"><p>'+s+"</p></div>")}else if(t.success){var r=t.message;o.html('<div id="give-batch-success" class="updated notice is-dismissible"><p>'+r+'<span class="notice-dismiss"></span></p></div>')}else o.remove(),window.location=t.url}else e(".give-progress div").animate({width:t.percentage+"%"},50,function(){}),n.process_step(parseInt(t.step),i,n)}}).fail(function(t){give_setting_edit=!1,window.console&&window.console.log&&console.log(t),e(".notice-wrap").append(t.responseText)})},dismiss_message:function(){e("body").on("click","#give-batch-success .notice-dismiss",function(){e("#give-batch-success").parent().slideUp("fast")})}},p={el:{},init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this,i=1,n=0;t.el.main_container=Give_Selector_Cache.get("#give-db-updates"),t.el.update_link=Give_Selector_Cache.get(".give-update-button a",t.el.main_container),t.el.run_upload_container=Give_Selector_Cache.get(".give-run-database-update",t.el.progress_main_container),t.el.progress_main_container=Give_Selector_Cache.get(".progress-container",t.el.main_container),t.el.heading=Give_Selector_Cache.get(".update-message",t.el.progress_main_container),t.el.progress_container=Give_Selector_Cache.get(".progress-content",t.el.progress_main_container),t.el.update_link.hasClass("active")||(t.el.update_link.on("click","",function(e){e.preventDefault(),t.el.run_upload_container.find(".notice").remove(),t.el.run_upload_container.append('<div class="notice notice-error non-dismissible give-run-update-containt"><p> <a href="#" class="give-run-update-button button">'+give_vars.db_update_confirmation_msg_button+"</a> "+give_vars.db_update_confirmation_msg+"</p></div>")}),e("#give-db-updates").on("click","a.give-run-update-button",function(a){return a.preventDefault(),!e(this).hasClass("active")&&(e(this).addClass("active").fadeOut(),t.el.update_link.addClass("active").fadeOut(),e("#give-db-updates .give-run-update-containt").slideUp(),t.el.progress_container.find(".notice-wrap").remove(),t.el.progress_container.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.el.progress_main_container.removeClass("give-hidden"),n=parseInt(t.el.heading.data("resume-update")),n&&(i=n),t.process_step(i,1,t),!1)}))},process_step:function(t,i,n){give_setting_edit=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(i)},dataType:"json",success:function(t){give_setting_edit=!1;var i=Give_Selector_Cache.get(".notice-wrap",n.el.progress_container,!0);-1!==e.inArray("success",Object.keys(t))?t.success?(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),n.el.update_link.closest("p").remove(),i.html('<div class="notice notice-success is-dismissible"><p>'+t.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),i.html('<div class="notice notice-error"><p>'+t.data.message+"</p></div>"),setTimeout(function(){n.el.update_link.removeClass("active").show(),n.el.progress_main_container.addClass("give-hidden")},5e3)):(e(".give-progress div","#give-db-updates").animate({width:t.data.percentage+"%"},50,function(){}),-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading.replace("{update_count}",n.el.heading.data("update-count"))+"</strong>"),n.process_step(parseInt(t.data.step),t.data.update,n))}}).fail(function(e){give_setting_edit=!1,window.console&&window.console.log&&console.log(e),Give_Selector_Cache.get(".notice-wrap",n.el.progress_container).append(e.responseText)}).always(function(){})},dismiss_message:function(){e("body").on("click","#poststuff .notice-dismiss",function(){e(this).parent().slideUp("fast")})}},g=function(){e('select[name="give-payment-status"]').on("change",function(){var t=e(this).val();e(".give-donation-status").removeClass(function(e,t){return(t.match(/\bstatus-\S+/g)||[]).join(" ")}).addClass("status-"+t)})},_={init:function(){this.edit_donor(),this.add_email(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_donor:function(){e("body").on("click","#edit-donor",function(t){t.preventDefault(),e("#give-donor-card-wrapper .editable").hide(),e("#give-donor-card-wrapper .edit-item").fadeIn().css("display","block"),e(".give-select-chosen").css("width","100%")})},remove_user:function(){e("body").on("click","#disconnect-donor",function(t){if(t.preventDefault(),!confirm(give_vars.disconnect_user))return!1;var i=e('input[name="customerinfo[id]"]').val(),n={give_action:"disconnect-userid",customer_id:i,_wpnonce:e("#edit-donor-info #_wpnonce").val()};e.post(ajaxurl,n,function(e){window.location.href=e.redirect},"json")})},cancel_edit:function(){e("body").on("click","#give-edit-donor-cancel",function(t){t.preventDefault(),e("#give-donor-card-wrapper .edit-item").hide(),e("#give-donor-card-wrapper .editable").show(),e(".give_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t=e(this),i={action:"give_get_states",country:t.val(),field_name:"customerinfo[state]"};return e.post(ajaxurl,i,function(n){t.closest(".donor-address").find('[name="customerinfo[state]"]').removeClass("give-hidden"),void 0!=typeof n.states_found&&1==n.states_found?e(':input[name="customerinfo[state]"]').replaceWith(n.data):(e(':input[name="customerinfo[state]"]').replaceWith('<input type="text" name="'+i.field_name+'" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!=typeof n.show_field&&0==n.show_field&&t.closest(".donor-address").find('[name="customerinfo[state]"]').addClass("give-hidden"))}),!1})},add_note:function(){e("body").on("click","#add-donor-note",function(t){t.preventDefault();var i={give_action:"add-donor-note",customer_id:e("#donor-id").val(),donor_note:e("#donor-note").val(),add_donor_note_nonce:e("#add_donor_note_nonce").val()};if(i.donor_note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-donor-notes").prepend(t),e(".give-no-donor-notes").hide(),e("#donor-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#donor-note").css("border-color");e("#donor-note").css("border-color","red"),setTimeout(function(){e("#donor-note").css("border-color",n)},500)}})},delete_checked:function(){e("#give-donor-delete-confirm").change(function(){var t=e("#give-donor-delete-records"),i=e("#give-delete-donor");e(this).prop("checked")?(t.attr("disabled",!1),i.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),i.attr("disabled",!0))})},add_email:function(){e("#add-donor-email").length&&e(document.body).on("click","#add-donor-email",function(t){t.preventDefault();var i=e(this),n=i.parent();n.parent().find(".notice-wrap").remove(),n.find(".spinner").css("visibility","visible"),i.attr("disabled",!0);var a=n.find('input[name="donor-id"]').val(),o=n.find('input[name="additional-email"]').val(),s=n.find('input[name="make-additional-primary"]').is(":checked"),r=n.find('input[name="add_email_nonce"]').val(),d={give_action:"add_donor_email",customer_id:a,email:o,primary:s,_wpnonce:r};e.post(ajaxurl,d,function(e){!0===e.success?window.location.href=e.redirect:(i.attr("disabled",!1),n.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),n.find(".spinner").css("visibility","hidden"))},"json")})}},f={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".give-revoke-api-key",function(e){return confirm(give_vars.revoke_api_key)})},regenerate_api_key:function(){e("body").on("click",".give-regenerate-api-key",function(e){return confirm(give_vars.regenerate_api_key)})}},h={init:function(){var t=e.query.get("give_tab").length?e.query.get("give_tab"):"form_field_options";this.handle_metabox_tab_click(),this.setup_colorpicker_fields(),this.setup_media_fields(),this.setup_repeatable_fields(),this.handle_repeater_group_events(),this.handle_multi_levels_repeater_group_events(),this.activate_tab(e('a[href="#'+t+'"]'))},handle_metabox_tab_click:function(){var t=this,i=e(".give-metabox-tabs a");i.on("click",function(i){i.preventDefault(),$this=e(this),t.activate_tab($this),t.update_query($this)})},activate_tab:function(t){var i=t.data("tab-id"),n=t.parent(),a=e("ul.give-metabox-sub-tabs",n),o=a.length,s=e(".give-metabox-tabs a"),r=s.parents("li"),d=e("ul.give-metabox-sub-tabs"),c=t.parents("ul.give-metabox-sub-tabs").length;if(e("#give_form_active_tab").val(i),o){n.toggleClass("active"),a.removeClass("give-hidden");var l=e("li.active","ul.give-metabox-sub-tabs");d.not(a).addClass("give-hidden"),r.not(n).removeClass("active"),l.addClass("active")}else c?c&&(e("ul.give-metabox-sub-tabs").addClass("give-hidden"),r.removeClass("active"),t.parents("ul.give-metabox-sub-tabs").removeClass("give-hidden").children("li").removeClass("active"),t.parents("li.has-sub-fields").addClass("active")):r.each(function(t,i){i=e(i),i.removeClass("active"),i.hasClass("has-sub-fields")&&e("ul.give-metabox-sub-tabs",i).addClass("give-hidden")});t.parent().addClass("active"),e(".give_options_panel").removeClass("active"),e(t.attr("href")).addClass("active")},update_query:function(t){var i=t.data("tab-id"),n=e.query.set("give_tab",i).remove("message").toString();history.replaceState&&history.replaceState(null,null,n)},setup_colorpicker_fields:function(){e(document).ready(function(){var t=e(".give-colorpicker");t.length&&t.each(function(t,i){var n=e(i);n.parents(".give-template").length||n.wpColorPicker()})})},setup_media_fields:function(){var t,i,n=e("body");n.on("click",".give-upload-button",function(a){a.preventDefault();var o={};switch(i=e(this),e(this).data("field-type")){case"media":o={title:give_vars.metabox_fields.media.button_title,button:{text:give_vars.metabox_fields.media.button_title},multiple:!1,library:{type:"image"}};break;default:o={title:give_vars.metabox_fields.file.button_title,button:{text:give_vars.metabox_fields.file.button_title},multiple:!1}}var s=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("editing");"undefined"!=typeof s&&(wp.media.controller.Library.prototype.defaults.contentUserSetting=!1);var r=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("library");"undefined"!=typeof r&&""!==r&&(o.library={type:r}),t=wp.media(o),t.on("select",function(){var e=t.state().get("selection").first().toJSON(),a=i.prev(),o="id"===i.data("fvalue")?e.id:e.url;if(n.trigger("give_media_inserted",[e,a]),a.val(o),"id"!==i.data("fvalue")){var s='input[name="'+a.attr("name")+'_id"]',r=a.closest("tr").next("tr").find(s);r.length&&a.closest("tr").next("tr").find(s).val(e.id)}}),t.open()}),n.on("give_media_inserted",function(t,n){var a=i.parents(".give-field-wrap"),o=e(".give-image-thumb",a);return!!o.length&&("image"!==n.type?(o.addClass("give-hidden"),e("img",o).attr("src",""),!1):(o.find("img").attr("src",n.url),void o.removeClass("give-hidden")))}),e("span.give-delete-image-thumb",".give-image-thumb").on("click",function(t){t.preventDefault();var i=e(this).parents(".give-field-wrap"),n=e(this).parent(),a=e('input[type="text"]',i);n.addClass("give-hidden"),a.val(""),e("img",n).attr("src","")})},setup_repeatable_fields:function(){jQuery(function(){jQuery(".give-repeatable-field-section").each(function(){var t=e(this),i={wrapper:".give-repeatable-fields-section-wrapper",container:".container",row:".give-row",add:".give-add-repeater-field-section-row",remove:".give-remove",move:".give-move",template:".give-template",confirm_before_remove_row:!0,confirm_before_remove_row_text:give_vars.confirm_before_remove_row_text,is_sortable:!0,before_add:null,after_add:m,before_remove:null,after_remove:b,sortable_options:{placeholder:"give-ui-placeholder-state-highlight",start:function(t,i){e("body").trigger("repeater_field_sorting_start",[i.item])},stop:function(t,i){e("body").trigger("repeater_field_sorting_stop",[i.item])},update:function(i,n){n.item.next().hasClass("give-template")&&n.item.next().after(n.item);var a=e(".give-row",t).not(".give-template");if(a.length){var o=1;a.each(function(t,i){var n=e(".give-field, label",e(i));n.length&&n.each(function(){var t=e(this).parents(".give-field-wrap"),i=e(this);e.each(this.attributes,function(e,n){var a=this.value.replace(/\[/g,"_").replace(/]/g,""),s=a+"_field",r="",d="";this.value&&(this.value=this.value.replace(/\[\d+\]/g,"["+(o-1)+"]"),d=this.value.replace(/\[/g,"_").replace(/]/g,""),t.hasClass(s)&&(r=d+"_field",t.removeClass(s).addClass(r)),a==i.attr("id")&&i.attr("id",d))})}),o++}),t.trigger("repeater_field_row_reordered",[n.item])}}}};jQuery(this).repeatable_fields(i)})})},handle_repeater_group_events:function(){var t=e(".give-repeatable-field-section"),i=e("body");i.on("click",".give-row-head button",function(){var t=e(this).closest("tr");t.toggleClass("closed"),e(".give-row-body",t).toggle()}),t.on("repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered",function(){y(e(this))}),i.on("repeater_field_sorting_start",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){tinyMCE.execCommand("mceRemoveEditor",!0,e(i).attr("id"))},300)})}),i.on("repeater_field_sorting_stop",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){var t=e(i).attr("id");tinyMCE.execCommand("mceAddEditor",!0,t),window.setTimeout(function(){switchEditors.go(t,"html"),e("#"+t+"-tmce").trigger("click")},100)},300)})}),t.each(function(t,i){var n=e(i);y(n),parseInt(n.data("close-tabs"))&&(e(".give-row-head button",n).trigger("click"),e(".give-template",n).removeClass("closed"),e(".give-template .give-row-body",n).show())}),t.on("repeater_field_new_row_added",function(t,i,n){e(".give-colorpicker",e(this)).each(function(t,i){var n=e(i);n.parents(".wp-picker-container").length||n.parents(".give-template").length||n.wpColorPicker()});var a=e("div[data-wp-editor]",n);a.length&&a.each(function(t,i){var n=e(i),a=e(".wp-editor-wrap",n),o=e("textarea",n),s="give_wysiwyg_unique_"+Math.random().toString().replace(".","_"),r=a.prev();o.attr("id",s),e.post(ajaxurl,{action:"give_load_wp_editor",wp_editor:n.data("wp-editor"),wp_editor_id:s,textarea_name:e("textarea",n).attr("name")},function(t){a.remove(),r.after(t),tinyMCEPreInit.qtInit[o.attr("id")]=e.extend(!0,tinyMCEPreInit.qtInit._give_agree_text,{id:s}),tinyMCEPreInit.mceInit[s]=e.extend(!0,tinyMCEPreInit.mceInit._give_agree_text,{body_class:s+" post-type-give_forms post-status-publish locale-"+tinyMCEPreInit.mceInit._give_agree_text.wp_lang_attr.toLowerCase(),
|
2 |
-
selector:"#"+s}),tinymce.init(tinyMCEPreInit.mceInit[s]),quicktags(tinyMCEPreInit.qtInit[s]),QTags._buttonsInit(),window.setTimeout(function(){switchEditors.go(s,"html"),e("#"+s+"-tmce").trigger("click")},100),window.wpActiveEditor||(window.wpActiveEditor=s)})})})},handle_multi_levels_repeater_group_events:function(){var t=e("#_give_donation_levels_field");e("body").on("keyup",".give-multilevel-text-field",function(){var t=e(this).closest("tr"),i=e(".give-row-head h2 span",t),n=i.data("header-title");return(!e(this).val()||e(this).val()!==i.html())&&void(e(this).val()?i.html(n+": "+e(this).val()):i.html(n))}),e(".give-multilevel-text-field").each(function(t,i){if(t){var n=e(i),a=n.closest("tr"),o=e(".give-row-head h2 span",a),s=o.data("header-title");return(!n.val()||n.val()!==o.html())&&void(n.val()?o.html(s+": "+n.val()):o.html(s))}}),t.on("repeater_field_row_deleted",function(){var t=e(this);window.setTimeout(function(){var i=t,n=e(".give-row",i).not(".give-template"),a=e(".give-give_default_radio_inline",n),o=n.length;1===o&&a.prop("checked",!0)},200)}),t.on("repeater_field_new_row_added",function(t,i,n){var a=e(this),o=0;window.setTimeout(function(){e(".give-give_default_radio_inline",a).is(":checked")===!1&&e(".give-row",a).not(".give-template").first().find(".give-give_default_radio_inline").prop("checked",!0)},200),e('input[type="hidden"].give-levels_id',a).each(function(t,i){var n=e(i),a=parseInt(n.val());o<a&&(o=a)}),e('input[type="hidden"].give-levels_id',n).val(++o)})}},m=function(t,i){var n=e(t).attr("data-rf-row-count"),a=e(t),o=a.parents(".give-repeatable-field-section");n++,e("*",i).each(function(){e.each(this.attributes,function(e,t){this.value=this.value.replace("{{row-count-placeholder}}",n-1)})}),e(t).attr("data-rf-row-count",n),o.trigger("repeater_field_new_row_added",[t,i])},b=function(t){var i=e(t),n=i.parents(".give-repeatable-field-section"),a=e(t).attr("data-rf-row-count");i.attr("data-rf-row-count",--a),n.trigger("repeater_field_row_deleted")},y=function(t){if(parseInt(t.data("group-numbering"))){var i=e(".give-row-head h2 span",t),n=i.data("header-title");i.each(function(t,i){var a=e(i);a.parents(".give-template").length||a.html(n+": "+t)})}},w=function(){jQuery('[data-tooltip!=""]').qtip({content:{attr:"data-tooltip"},style:{classes:"qtip-rounded qtip-tipsy"},events:{show:function(t,i){var n=e(i.elements.target[0]);n.qtip("option","position.my",void 0===n.data("tooltip-my-position")?"bottom center":n.data("tooltip-my-position")),n.qtip("option","position.at",void 0===n.data("tooltip-target-position")?"top center":n.data("tooltip-target-position"))}}})},x={init:function(){e("body").on("click",'#give-payments-filter input[type="submit"]',this.handleBulkActions)},handleBulkActions:function(){var t=e(this).closest(".tablenav").find("select").val(),i=e(this).closest(".tablenav").find('option[value="'+t+'"]').text(),n=e('input[name="payment[]"]:checked').length,a=-1!==t.indexOf("set-status-"),o="",s="";if(t=a?"set-to-status":t,Object.keys(give_vars.bulk_action).length)for(s in give_vars.bulk_action)if(s===t)return o=a?give_vars.bulk_action[t].zero.replace("{status}",i.replace("Set To ","")):give_vars.bulk_action[t].zero,parseInt(n)?(o=1<n?give_vars.bulk_action[t].multiple:give_vars.bulk_action[t].single,window.confirm(o.replace("{payment_count}",n).replace("{status}",i.replace("Set To ","")))):(alert(o),!1);return!0}};e(function(){function n(t){t.each(function(){e(this).qtip({style:"qtip-dark qtip-tipsy",content:{text:give_vars.price_format_guide.trim()},show:"",position:{my:"bottom center",at:"top center"}})})}i(),a(),o(),g(),r(),d.init(),c.init(),l.init(),v.init(),_.init(),f.init(),u.init(),p.init(),h.init(),x.init(),w(),e("a.give-rating-link").click(function(){jQuery(this).parent().text(jQuery(this).data("rated"))});var m=e("input.give-money-field, input.give-price-field"),b=give_vars.thousands_separator,y=give_vars.decimal_separator,k="",j="",C="",Q=y===b?1:0;n(m),e("#_give_donation_levels_repeat").on("click","button.cmb-add-group-row",function(){window.setTimeout(function(){m=e("input.give-money-field, input.give-price-field"),n(m)},100)}),e("#poststuff").on("keyup","input.give-money-field, input.give-price-field",function(){k=(e(this).val().match(new RegExp(b,"g"))||[]).length,j=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(b)&&Q<k?e(this).qtip("show"):j?e(this).qtip("show"):e(this).qtip("hide"),k=j=""}),e("#poststuff").on("focusout","input.give-money-field, input.give-price-field",function(){return C=t(e(this).val(),!1),t("0",!1)===t(e(this).val(),!1)?(e(this).val(""),!1):(C=C.replace(".",y),-1!==C.indexOf("-")&&(C=C.replace("-","")),void e(this).val(C))}),e(".give-settings-page").on("click","#give-show-sub-nav",function(t){t.preventDefault();var i=e(this).next();return i.is(":hover")||i.toggleClass("give-hidden"),!1}).on("blur","#give-show-sub-nav",function(){var t=e(this).next();t.is(":hover")||t.addClass("give-hidden")}),give_render_responsive_tabs(),s()})}(jQuery),jQuery(window).resize(function(){give_render_responsive_tabs()});
|
1 |
+
function give_render_responsive_tabs(){var e=jQuery(".give-settings-page"),t=jQuery(".give-nav-tab-wrapper"),i=e.width(),n=jQuery(".give-sub-nav-tab-wrapper"),a=jQuery("nav",n),o=jQuery(".give-nav-tab-wrapper>a:not(give-not-tab)"),s=[],r=[],d=0;if(600<jQuery(window).outerWidth()&&(d=200),!e.length)return!1;t.css({height:"auto",overflow:"visible"}),o.removeClass("give-hidden");var c=new Promise(function(e,t){jQuery.each(o,function(e,t){t=jQuery(t),d+=parseInt(t.outerWidth()),d<i?s.push(t):r.push(t)}),e(!0)});c.then(function(e){if(r.length&&-1!=window.location.search.indexOf("&tab=")){var i={},o=get_url_params();r=r.filter(function(e){var t=-1!=parseInt(e.attr("href").indexOf("&tab="+o.tab));return t&&(i=e),!t}),i.length&&(r.unshift(s.pop()),s.push(i))}var d=new Promise(function(e,t){s.length&&jQuery.each(s,function(e,t){t=jQuery(t),t.hasClass("give-hidden")&&t.removeClass("give-hidden")}),e(!0)});d.then(function(e){r.length?(a.html(""),jQuery.each(r,function(e,t){t=jQuery(t),t.addClass("give-hidden"),t.clone().removeClass().appendTo(a)}),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(n),n.show()):n.hide()})})}function get_url_params(){for(var e,t=[],i=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),n=0;n<i.length;n++)e=i[n].split("="),t[e[0]]=e[1];return t}function give_on_donation_import_start(){give_on_donation_import_ajax()}function give_on_donation_import_ajax(){var e=jQuery("form.tools-setting-page-import");give_setting_edit=!0;var t=e.find(".give-progress"),i=jQuery(t).data("total_ajax"),n=jQuery(t).data("current"),a=jQuery(t).data("start"),o=jQuery(t).data("end"),s=jQuery(t).data("next"),r=jQuery(t).data("total"),d=jQuery(t).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:give_vars.give_donation_import,total_ajax:i,current:n,start:a,end:o,next:s,total:r,per_page:d,fields:e.serialize()},dataType:"json",success:function(e){jQuery(t).data("current",e.current),jQuery(t).find("div").width(e.percentage+"%"),1==e.next?(jQuery(t).data("start",e.start),jQuery(t).data("end",e.end),1==e.last&&jQuery(t).data("next",!1),give_on_donation_import_ajax()):(give_setting_edit=!1,window.location=e.url)},error:function(){give_setting_edit=!1,alert(give_vars.error_message)}})}jQuery.noConflict();var give_setting_edit=!1;!function(e){function t(e,t){return e=accounting.unformat(e,give_vars.decimal_separator).toString(),t="undefined"!==t&&t,e=!1!==t?parseFloat(e).toFixed(t):parseFloat(e).toFixed(give_vars.currency_decimals)}var i=function(){e("body").on("click","button.notice-dismiss",function(){"give-invalid-license"!==jQuery(this).closest("div.give-notice").data("notice-id")&&n()})},n=function(){var e="give-message",t=document.location.href,i=t.split("?");if(i.length>=2){for(var n=i.shift(),a=i.join("?"),o=encodeURIComponent(e)+"=",s=a.split(/[&;]/g),r=s.length;r-- >0;)s[r].lastIndexOf(o,0)!==-1&&s.splice(r,1);t=n+"?"+s.join("&"),window.history.pushState("",document.title,t)}return t},a=function(){if(e(".give_datepicker").length>0){var t="mm/dd/yy";e(".give_datepicker").datepicker({dateFormat:t})}},o=function(){jQuery("body.post-type-give_forms").length>0&&(window.addEventListener("beforeunload",function(e){var t=give_vars.setting_not_save_message;if(give_setting_edit)return(e||window.event).returnValue=t,t}),jQuery("body").on("click",".give-save-button",function(){give_setting_edit=!1}))},s=function(){if(jQuery("body.give_forms_page_give-settings").length>0){var e=jQuery("body.give_forms_page_give-settings #give-mainform").serialize();jQuery(".give-settings-page").on("change keyup blur","form",function(t){var i=jQuery("body.give_forms_page_give-settings #give-mainform").serialize();give_setting_edit=e!=i})}},r=function(){var t=e(".give-select-chosen");t.on("chosen:ready",function(){e(this).next(".chosen-container").find("input.chosen-search-input").after('<span class="spinner"></span>')}),t.on("chosen:no_results",function(){var t=e(this).next(".chosen-container"),i=t.find("li.no-results"),n="";n=t.hasClass("give-select-chosen-ajax")&&i.length?give_vars.chosen.ajax_search_msg.replace("{search_term}",'"'+e("input",t).val()+'"'):give_vars.chosen.no_results_msg.replace("{search_term}",'"'+e("input",t).val()+'"'),i.html(n)}),t.chosen({inherit_select_classes:!0,placeholder_text_single:give_vars.one_option,placeholder_text_multiple:give_vars.one_or_more_option}),e("#post").on("click",".give-thickbox",function(){e(".give-select-chosen","#choose-give-form").css("width","100%")});var i,n=342;e(document.body).on("keyup",".give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input",function(t){var a=e(this).val(),o=e(this).closest(".give-select-chosen"),s=o.prev(),r=o.find('input[type="text"]'),d=(o.hasClass("variations"),t.which),c="give_forms_search";if(o.prev().data("search-type")){if("no_ajax"===s.data("search-type"))return;c="give_"+s.data("search-type")+"_search"}a.length<=3||!c.length||9===d||13===d||16===d||17===d||18===d||19===d||20===d||27===d||33===d||34===d||35===d||36===d||37===d||38===d||39===d||40===d||44===d||45===d||144===d||145===d||91===d||93===d||224===d||112<=d&&123>=d||(clearTimeout(i),o.addClass("give-select-chosen-ajax"),i=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:c,s:a},dataType:"json",beforeSend:function(){s.closest("ul.chosen-results").empty(),r.prop("disabled",!0)},success:function(t){o.removeClass("give-select-chosen-ajax"),e("option:not(:selected)",s).remove(),t.length?(e.each(t,function(t,i){e('option[value="'+i.id+'"]',s).length||s.prepend('<option value="'+i.id+'">'+i.name+"</option>")}),o.prev("select.give-select-chosen").trigger("chosen:updated")):o.prev("select.give-select-chosen").trigger("chosen:no_results"),r.prop("disabled",!1),r.val(a).focus()}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){r.prop("disabled",!1)})},n))}),e(".give-select-chosen .chosen-search input").each(function(){var t=e(this).parent().parent().parent().prev("select.give-select-chosen").data("search-type"),i="";"form"===t?i=give_vars.search_placeholder:(t="search_placeholder_"+t,give_vars[t]&&(i=give_vars[t])),e(this).attr("placeholder",i)})},d={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){e("body").on("click",".delete-single-donation",function(){return confirm(give_vars.delete_payment)})},resendSingleDonationReceipt:function(){e("body").on("click",".resend-single-donation-receipt",function(){return confirm(give_vars.resend_receipt)})}},c={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"},e.post(ajaxurl,data,function(i){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden");var n=e("#give-order-address-state-wrap");n.find("*").not(".order-data-address-line").remove(),void 0!=typeof i.states_found&&1==i.states_found?(n.append(i.data),n.find("select").chosen()):(n.append('<input type="text" name="give-payment-address[0][state]" value="'+i.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!=typeof i.show_field&&0==i.show_field&&t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"))}),!1})},add_note:function(){e("#give-add-payment-note").on("click",function(t){t.preventDefault();var i={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#give-payment-note").val()};if(i.note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#give-payment-note").css("border-color");e("#give-payment-note").css("border-color","red"),setTimeout(function(){e("#give-payment-note").css("border-color",n)},500)}})},remove_note:function(){e("body").on("click",".give-delete-payment-note",function(t){if(t.preventDefault(),confirm(give_vars.delete_payment_note)){var i={action:"give_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){return e("#give-payment-note-"+i.note_id).remove(),e(".give-payment-note").length||e(".give-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},new_donor:function(){e("#give-donor-details").on("click",".give-payment-new-donor, .give-payment-new-donor-cancel",function(t){t.preventDefault(),e(".donor-info").toggle(),e(".new-donor").toggle(),e(".new-donor").is(":visible")?e("#give-new-donor").val(1):e("#give-new-donor").val(0)})},resend_receipt:function(){e("body").on("click","#give-resend-receipt",function(e){return confirm(give_vars.resend_receipt)})},variable_price_list:function(){e("#give_payment_form_select").chosen().change(function(){var t,i=e(".give-donation-level");return!!(t=e(this).val())&&(!!i.length&&void e.ajax({type:"POST",url:ajaxurl,data:{form_id:t,payment_id:e('input[name="give_payment_id"]').val(),action:"give_check_for_form_price_variations_html"},success:function(t){t=t.trim(),t?(i.html(t),e('select[name="give-variable-price"]').chosen().change()):i.html("")}}))}),e("#give-donation-overview").on("change",'select[name="give-variable-price"]',function(){var t=jQuery(this).data("prices"),i=e("#give-payment-total");e(this).val()in t&&(i.val(t[e(this).val()]).css("background-color","yellow"),window.setTimeout(function(){i.css("background-color","white")},1e3))})}},l={init:function(){this.setting_change_country(),this.toggle_options(),this.main_setting_update_notice(),this.verify_settings()},setting_change_country:function(){e('select[name="base_country"]').change(function(){var t=e(this),i={action:"give_get_states",country:t.val(),field_name:"base_state"};return e.post(ajaxurl,i,function(n){t.closest("tr").next().show(),void 0!=typeof n.states_found&&1==n.states_found?e(':input[name="base_state"]').replaceWith(n.data):(void 0!=typeof n.show_field&&0==n.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith('<input type="text" name="'+i.field_name+'" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'))}),!1})},toggle_options:function(){var t=e('input[name="email_access"]',".give-setting-tab-body-general");t.on("change",function(){var t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val();"enabled"===t?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())}).change();var i=e('input[name="form_featured_img"]',".give-setting-tab-body-display");i.on("change",function(){var t=e('input[name="form_featured_img"]:checked',".give-setting-tab-body-display").val();"enabled"===t?e("#featured_image_size").parents("tr").show():e("#featured_image_size").parents("tr").hide()}).change();var n=e('input[name="terms"]',".give-setting-tab-body-display");n.on("change",function(){var t=e('input[name="terms"]:checked',".give-setting-tab-body-display").val();"enabled"===t?(e("#agree_to_terms_label").parents("tr").show(),e("#wp-agreement_text-wrap").parents("tr").show()):(e("#agree_to_terms_label").parents("tr").hide(),e("#wp-agreement_text-wrap").parents("tr").hide())}).change();var a=e('input[name="admin_notices"]',".give-setting-tab-body-emails");a.on("change",function(){var t=e('input[name="admin_notices"]:checked',".give-setting-tab-body-emails").val();"enabled"===t?(e("#donation_notification_subject").parents("tr").show(),e("#wp-donation_notification-wrap").parents("tr").show(),e("#admin_notice_emails").parents("tr").show()):(e("#donation_notification_subject").parents("tr").hide(),e("#wp-donation_notification-wrap").parents("tr").hide(),e("#admin_notice_emails").parents("tr").hide())}).change()},main_setting_update_notice:function(){var t=e("#setting-error-give-setting-updated");t.length&&window.setTimeout(function(){t.slideUp()},5e3)},verify_settings:function(){var t=e("#success_page"),i=e("#failure_page");t.add(i).change(function(){if(t.val()===i.val()){var n='<div id="setting-error-give-matched-success-failure-page" class="updated settings-error notice is-dismissible"> <p><strong>'+give_vars.matched_success_failure_page+'</strong></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+give_vars.dismiss_notice_text+"</span></button> </div>",a=e("#setting-error-give-matched-success-failure-page");if(e(this).val(""),a.length)return!1;e("h1","#give-mainform").after(n),a=e("#setting-error-give-matched-success-failure-page"),e(".notice-dismiss",a).click(function(){a.remove()})}}).change()}},v={init:function(){this.date_options(),this.donors_export(),this.recount_stats()},date_options:function(){e("#give-graphs-date-options").change(function(){var t=e(this);"other"===t.val()?e("#give-date-range-options").show():e("#give-date-range-options").hide()})},donors_export:function(){e("#give_donor_export_form").change(function(){var t=e(this),i=e("option:selected",t).val(),n=e("#give_customer_export_option");"0"===t.val()?n.show():n.hide();var a=e(".give_price_options_select");if(0!=parseInt(i)){var o={action:"give_check_for_form_price_variations",form_id:i,all_prices:!0};e.post(ajaxurl,o,function(t){a.remove(),e("#give_donor_export_form_chosen").after(t)})}else a.remove()})},recount_stats:function(){e("body").on("change","#recount-stats-type",function(){var t=e("#give-tools-recount-form"),i=e("option:selected",this).data("type"),n=e("#recount-stats-submit"),a=e(".tools-form-dropdown");if(t.find(".notice-wrap").remove(),n.removeClass("button-disabled").attr("disabled",!1),a.hide(),e(".give-recount-stats-descriptions span").hide(),"reset-stats"===i){t.append('<div class="notice-wrap"></div>');var o=t.find(".notice-wrap");o.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.reset_stats_warn+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-test-donors"===i){t.append('<div class="notice-wrap"></div>');var o=t.find(".notice-wrap");o.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_test_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else if("delete-import-donors"===i){t.append('<div class="notice-wrap"></div>');var o=t.find(".notice-wrap");o.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+give_vars.delete_import_donor+"</label></p></div>"),n.addClass("button-disabled").attr("disabled","disabled")}else a.hide(),a.val(0);current_forms=e(".tools-form-dropdown-"+i),current_forms.show(),current_forms.find(".give-select-chosen").css({width:"auto","min-width":"250px"}),e("#"+i).show()}),e("body").on("change","#confirm-reset",function(){var t=e(this).is(":checked");t?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),e("#give-tools-recount-form").submit(function(t){var i=e("#recount-stats-type").val(),n=e(this),a=e("option:selected",this).data("type");if("reset-stats"===a){var o=e("#confirm-reset").is(":checked");if(o)return!0;r=!0}n.find(".notice-wrap").remove(),n.append('<div class="notice-wrap"></div>');var s=n.find(".notice-wrap"),r=!1;if(null!==i&&0!==i||(s.html('<div class="updated error"><p>'+give_vars.batch_export_no_class+"</p></div>"),r=!0),"recount-form"===a){var d=e('select[name="form_id"]').val();0==d&&(s.html('<div class="updated error"><p>'+give_vars.batch_export_no_reqs+"</p></div>"),r=!0)}if(r)return n.find(".button-disabled").removeClass("button-disabled"),!1})}},u={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".give-export-form",function(i){i.preventDefault();var n=e(this).find('input[type="submit"]');if(!n.hasClass("button-disabled")){var a=e(this).serialize();n.addClass("button-disabled"),e(this).find(".notice-wrap").remove(),e(this).append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.process_step(1,a,t)}})},process_step:function(t,i,n){give_setting_edit=!0,e.ajax({type:"POST",url:ajaxurl,data:{form:i,action:"give_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){give_setting_edit=!1;var a=e(".give-export-form").find(".give-progress").parent().parent(),o=a.find(".notice-wrap");if(a.find(".button-disabled").removeClass("button-disabled"),t.error){var s=t.message;o.html('<div class="updated error"><p>'+s+"</p></div>")}else if(t.success){var r=t.message;o.html('<div id="give-batch-success" class="updated notice is-dismissible"><p>'+r+'<span class="notice-dismiss"></span></p></div>')}else o.remove(),window.location=t.url}else e(".give-progress div").animate({width:t.percentage+"%"},50,function(){}),n.process_step(parseInt(t.step),i,n);e("#give-tools-recount-form")[0].reset()}}).fail(function(t){give_setting_edit=!1,window.console&&window.console.log&&console.log(t),e(".notice-wrap").append(t.responseText)})},dismiss_message:function(){e("body").on("click","#give-batch-success .notice-dismiss",function(){e("#give-batch-success").parent().slideUp("fast")})}},p={el:{},init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this,i=1,n=0;t.el.main_container=Give_Selector_Cache.get("#give-db-updates"),t.el.update_link=Give_Selector_Cache.get(".give-update-button a",t.el.main_container),t.el.run_upload_container=Give_Selector_Cache.get(".give-run-database-update",t.el.progress_main_container),t.el.progress_main_container=Give_Selector_Cache.get(".progress-container",t.el.main_container),t.el.heading=Give_Selector_Cache.get(".update-message",t.el.progress_main_container),t.el.progress_container=Give_Selector_Cache.get(".progress-content",t.el.progress_main_container),t.el.update_link.hasClass("active")||(t.el.update_link.on("click","",function(e){e.preventDefault(),t.el.run_upload_container.find(".notice").remove(),t.el.run_upload_container.append('<div class="notice notice-error non-dismissible give-run-update-containt"><p> <a href="#" class="give-run-update-button button">'+give_vars.db_update_confirmation_msg_button+"</a> "+give_vars.db_update_confirmation_msg+"</p></div>")}),e("#give-db-updates").on("click","a.give-run-update-button",function(a){return a.preventDefault(),!e(this).hasClass("active")&&(e(this).addClass("active").fadeOut(),t.el.update_link.addClass("active").fadeOut(),e("#give-db-updates .give-run-update-containt").slideUp(),t.el.progress_container.find(".notice-wrap").remove(),t.el.progress_container.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.el.progress_main_container.removeClass("give-hidden"),n=parseInt(t.el.heading.data("resume-update")),n&&(i=n),t.process_step(i,1,t),!1)}))},process_step:function(t,i,n){give_setting_edit=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(i)},dataType:"json",success:function(t){give_setting_edit=!1;var i=Give_Selector_Cache.get(".notice-wrap",n.el.progress_container,!0);-1!==e.inArray("success",Object.keys(t))?t.success?(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),n.el.update_link.closest("p").remove(),i.html('<div class="notice notice-success is-dismissible"><p>'+t.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading+"</strong>"),i.html('<div class="notice notice-error"><p>'+t.data.message+"</p></div>"),setTimeout(function(){n.el.update_link.removeClass("active").show(),n.el.progress_main_container.addClass("give-hidden")},5e3)):(e(".give-progress div","#give-db-updates").animate({width:t.data.percentage+"%"},50,function(){}),-1!==e.inArray("heading",Object.keys(t.data))&&n.el.heading.html("<strong>"+t.data.heading.replace("{update_count}",n.el.heading.data("update-count"))+"</strong>"),n.process_step(parseInt(t.data.step),t.data.update,n))}}).fail(function(e){give_setting_edit=!1,window.console&&window.console.log&&console.log(e),Give_Selector_Cache.get(".notice-wrap",n.el.progress_container).append(e.responseText)}).always(function(){})},dismiss_message:function(){e("body").on("click","#poststuff .notice-dismiss",function(){e(this).parent().slideUp("fast")})}},g=function(){e('select[name="give-payment-status"]').on("change",function(){var t=e(this).val();e(".give-donation-status").removeClass(function(e,t){return(t.match(/\bstatus-\S+/g)||[]).join(" ")}).addClass("status-"+t)})},_={init:function(){this.edit_donor(),this.add_email(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_donor:function(){e("body").on("click","#edit-donor",function(t){t.preventDefault(),e("#give-donor-card-wrapper .editable").hide(),e("#give-donor-card-wrapper .edit-item").fadeIn().css("display","block"),e(".give-select-chosen").css("width","100%")})},remove_user:function(){e("body").on("click","#disconnect-donor",function(t){if(t.preventDefault(),!confirm(give_vars.disconnect_user))return!1;var i=e('input[name="customerinfo[id]"]').val(),n={give_action:"disconnect-userid",customer_id:i,_wpnonce:e("#edit-donor-info #_wpnonce").val()};e.post(ajaxurl,n,function(e){window.location.href=e.redirect},"json")})},cancel_edit:function(){e("body").on("click","#give-edit-donor-cancel",function(t){t.preventDefault(),e("#give-donor-card-wrapper .edit-item").hide(),e("#give-donor-card-wrapper .editable").show(),e(".give_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t=e(this),i={action:"give_get_states",country:t.val(),field_name:"customerinfo[state]"};return e.post(ajaxurl,i,function(n){t.closest(".donor-address").find('[name="customerinfo[state]"]').removeClass("give-hidden"),void 0!=typeof n.states_found&&1==n.states_found?e(':input[name="customerinfo[state]"]').replaceWith(n.data):(e(':input[name="customerinfo[state]"]').replaceWith('<input type="text" name="'+i.field_name+'" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!=typeof n.show_field&&0==n.show_field&&t.closest(".donor-address").find('[name="customerinfo[state]"]').addClass("give-hidden"))}),!1})},add_note:function(){e("body").on("click","#add-donor-note",function(t){t.preventDefault();var i={give_action:"add-donor-note",customer_id:e("#donor-id").val(),donor_note:e("#donor-note").val(),add_donor_note_nonce:e("#add_donor_note_nonce").val()};if(i.donor_note)e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){e("#give-donor-notes").prepend(t),e(".give-no-donor-notes").hide(),e("#donor-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#donor-note").css("border-color");e("#donor-note").css("border-color","red"),setTimeout(function(){e("#donor-note").css("border-color",n)},500)}})},delete_checked:function(){e("#give-donor-delete-confirm").change(function(){var t=e("#give-donor-delete-records"),i=e("#give-delete-donor");e(this).prop("checked")?(t.attr("disabled",!1),i.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),i.attr("disabled",!0))})},add_email:function(){e("#add-donor-email").length&&e(document.body).on("click","#add-donor-email",function(t){t.preventDefault();var i=e(this),n=i.parent();n.parent().find(".notice-wrap").remove(),n.find(".spinner").css("visibility","visible"),i.attr("disabled",!0);var a=n.find('input[name="donor-id"]').val(),o=n.find('input[name="additional-email"]').val(),s=n.find('input[name="make-additional-primary"]').is(":checked"),r=n.find('input[name="add_email_nonce"]').val(),d={give_action:"add_donor_email",customer_id:a,email:o,primary:s,_wpnonce:r};e.post(ajaxurl,d,function(e){!0===e.success?window.location.href=e.redirect:(i.attr("disabled",!1),n.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),n.find(".spinner").css("visibility","hidden"))},"json")})}},f={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".give-revoke-api-key",function(e){return confirm(give_vars.revoke_api_key)})},regenerate_api_key:function(){e("body").on("click",".give-regenerate-api-key",function(e){return confirm(give_vars.regenerate_api_key)})}},h={init:function(){var t=e.query.get("give_tab").length?e.query.get("give_tab"):"form_field_options";this.handle_metabox_tab_click(),this.setup_colorpicker_fields(),this.setup_media_fields(),this.setup_repeatable_fields(),this.handle_repeater_group_events(),this.handle_multi_levels_repeater_group_events(),this.activate_tab(e('a[href="#'+t+'"]'))},handle_metabox_tab_click:function(){var t=this,i=e(".give-metabox-tabs a");i.on("click",function(i){i.preventDefault(),$this=e(this),t.activate_tab($this),t.update_query($this)})},activate_tab:function(t){var i=t.data("tab-id"),n=t.parent(),a=e("ul.give-metabox-sub-tabs",n),o=a.length,s=e(".give-metabox-tabs a"),r=s.parents("li"),d=e("ul.give-metabox-sub-tabs"),c=t.parents("ul.give-metabox-sub-tabs").length;if(e("#give_form_active_tab").val(i),o){n.toggleClass("active"),a.removeClass("give-hidden");var l=e("li.active","ul.give-metabox-sub-tabs");d.not(a).addClass("give-hidden"),r.not(n).removeClass("active"),l.addClass("active")}else c?c&&(e("ul.give-metabox-sub-tabs").addClass("give-hidden"),r.removeClass("active"),t.parents("ul.give-metabox-sub-tabs").removeClass("give-hidden").children("li").removeClass("active"),t.parents("li.has-sub-fields").addClass("active")):r.each(function(t,i){i=e(i),i.removeClass("active"),i.hasClass("has-sub-fields")&&e("ul.give-metabox-sub-tabs",i).addClass("give-hidden")});t.parent().addClass("active"),e(".give_options_panel").removeClass("active"),e(t.attr("href")).addClass("active")},update_query:function(t){var i=t.data("tab-id"),n=e.query.set("give_tab",i).remove("message").toString();history.replaceState&&history.replaceState(null,null,n)},setup_colorpicker_fields:function(){e(document).ready(function(){var t=e(".give-colorpicker");t.length&&t.each(function(t,i){var n=e(i);n.parents(".give-template").length||n.wpColorPicker()})})},setup_media_fields:function(){var t,i,n=e("body");n.on("click",".give-upload-button",function(a){a.preventDefault();var o={};switch(i=e(this),e(this).data("field-type")){case"media":o={title:give_vars.metabox_fields.media.button_title,button:{text:give_vars.metabox_fields.media.button_title},multiple:!1,library:{type:"image"}};break;default:o={title:give_vars.metabox_fields.file.button_title,button:{text:give_vars.metabox_fields.file.button_title},multiple:!1}}var s=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("editing");"undefined"!=typeof s&&(wp.media.controller.Library.prototype.defaults.contentUserSetting=!1);var r=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("library");"undefined"!=typeof r&&""!==r&&(o.library={type:r}),t=wp.media(o),t.on("select",function(){var e=t.state().get("selection").first().toJSON(),a=i.prev(),o="id"===i.data("fvalue")?e.id:e.url;if(n.trigger("give_media_inserted",[e,a]),a.val(o),"id"!==i.data("fvalue")){var s='input[name="'+a.attr("name")+'_id"]',r=a.closest("tr").next("tr").find(s);r.length&&a.closest("tr").next("tr").find(s).val(e.id)}}),t.open()}),n.on("give_media_inserted",function(t,n){var a=i.parents(".give-field-wrap"),o=e(".give-image-thumb",a);return!!o.length&&("image"!==n.type?(o.addClass("give-hidden"),e("img",o).attr("src",""),!1):(o.find("img").attr("src",n.url),void o.removeClass("give-hidden")))}),e("span.give-delete-image-thumb",".give-image-thumb").on("click",function(t){t.preventDefault();var i=e(this).parents(".give-field-wrap"),n=e(this).parent(),a=e('input[type="text"]',i);n.addClass("give-hidden"),a.val(""),e("img",n).attr("src","")})},setup_repeatable_fields:function(){jQuery(function(){jQuery(".give-repeatable-field-section").each(function(){var t=e(this),i={wrapper:".give-repeatable-fields-section-wrapper",container:".container",row:".give-row",add:".give-add-repeater-field-section-row",remove:".give-remove",move:".give-move",template:".give-template",confirm_before_remove_row:!0,confirm_before_remove_row_text:give_vars.confirm_before_remove_row_text,is_sortable:!0,before_add:null,after_add:m,before_remove:null,after_remove:b,sortable_options:{placeholder:"give-ui-placeholder-state-highlight",start:function(t,i){e("body").trigger("repeater_field_sorting_start",[i.item])},stop:function(t,i){e("body").trigger("repeater_field_sorting_stop",[i.item])},update:function(i,n){n.item.next().hasClass("give-template")&&n.item.next().after(n.item);var a=e(".give-row",t).not(".give-template");if(a.length){var o=1;a.each(function(t,i){var n=e(".give-field, label",e(i));n.length&&n.each(function(){var t=e(this).parents(".give-field-wrap"),i=e(this);e.each(this.attributes,function(e,n){var a=this.value.replace(/\[/g,"_").replace(/]/g,""),s=a+"_field",r="",d="";this.value&&(this.value=this.value.replace(/\[\d+\]/g,"["+(o-1)+"]"),d=this.value.replace(/\[/g,"_").replace(/]/g,""),t.hasClass(s)&&(r=d+"_field",t.removeClass(s).addClass(r)),a==i.attr("id")&&i.attr("id",d))})}),o++}),t.trigger("repeater_field_row_reordered",[n.item])}}}};jQuery(this).repeatable_fields(i)})})},handle_repeater_group_events:function(){var t=e(".give-repeatable-field-section"),i=e("body");i.on("click",".give-row-head button",function(){var t=e(this).closest("tr");t.toggleClass("closed"),e(".give-row-body",t).toggle()}),t.on("repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered",function(){y(e(this))}),i.on("repeater_field_sorting_start",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){tinyMCE.execCommand("mceRemoveEditor",!0,e(i).attr("id"))},300)})}),i.on("repeater_field_sorting_stop",function(t,i){var n=e(".wp-editor-area",i);n.length&&n.each(function(t,i){window.setTimeout(function(){var t=e(i).attr("id");tinyMCE.execCommand("mceAddEditor",!0,t),window.setTimeout(function(){switchEditors.go(t,"html"),e("#"+t+"-tmce").trigger("click")},100)},300)})}),t.each(function(t,i){var n=e(i);y(n),parseInt(n.data("close-tabs"))&&(e(".give-row-head button",n).trigger("click"),e(".give-template",n).removeClass("closed"),e(".give-template .give-row-body",n).show())}),t.on("repeater_field_new_row_added",function(t,i,n){e(".give-colorpicker",e(this)).each(function(t,i){var n=e(i);n.parents(".wp-picker-container").length||n.parents(".give-template").length||n.wpColorPicker()});var a=e("div[data-wp-editor]",n);a.length&&a.each(function(t,i){var n=e(i),a=e(".wp-editor-wrap",n),o=e("textarea",n),s="give_wysiwyg_unique_"+Math.random().toString().replace(".","_"),r=a.prev();o.attr("id",s),e.post(ajaxurl,{action:"give_load_wp_editor",wp_editor:n.data("wp-editor"),wp_editor_id:s,textarea_name:e("textarea",n).attr("name")},function(t){a.remove(),r.after(t),tinyMCEPreInit.qtInit[o.attr("id")]=e.extend(!0,tinyMCEPreInit.qtInit._give_agree_text,{id:s}),tinyMCEPreInit.mceInit[s]=e.extend(!0,tinyMCEPreInit.mceInit._give_agree_text,{
|
2 |
+
body_class:s+" post-type-give_forms post-status-publish locale-"+tinyMCEPreInit.mceInit._give_agree_text.wp_lang_attr.toLowerCase(),selector:"#"+s}),tinymce.init(tinyMCEPreInit.mceInit[s]),quicktags(tinyMCEPreInit.qtInit[s]),QTags._buttonsInit(),window.setTimeout(function(){switchEditors.go(s,"html"),e("#"+s+"-tmce").trigger("click")},100),window.wpActiveEditor||(window.wpActiveEditor=s)})})})},handle_multi_levels_repeater_group_events:function(){var t=e("#_give_donation_levels_field");e("body").on("keyup",".give-multilevel-text-field",function(){var t=e(this).closest("tr"),i=e(".give-row-head h2 span",t),n=i.data("header-title");return(!e(this).val()||e(this).val()!==i.html())&&void(e(this).val()?i.html(n+": "+e(this).val()):i.html(n))}),e(".give-multilevel-text-field").each(function(t,i){if(t){var n=e(i),a=n.closest("tr"),o=e(".give-row-head h2 span",a),s=o.data("header-title");return(!n.val()||n.val()!==o.html())&&void(n.val()?o.html(s+": "+n.val()):o.html(s))}}),t.on("repeater_field_row_deleted",function(){var t=e(this);window.setTimeout(function(){var i=t,n=e(".give-row",i).not(".give-template"),a=e(".give-give_default_radio_inline",n),o=n.length;1===o&&a.prop("checked",!0)},200)}),t.on("repeater_field_new_row_added",function(t,i,n){var a=e(this),o=0;window.setTimeout(function(){e(".give-give_default_radio_inline",a).is(":checked")===!1&&e(".give-row",a).not(".give-template").first().find(".give-give_default_radio_inline").prop("checked",!0)},200),e('input[type="hidden"].give-levels_id',a).each(function(t,i){var n=e(i),a=parseInt(n.val());o<a&&(o=a)}),e('input[type="hidden"].give-levels_id',n).val(++o)})}},m=function(t,i){var n=e(t).attr("data-rf-row-count"),a=e(t),o=a.parents(".give-repeatable-field-section");n++,e("*",i).each(function(){e.each(this.attributes,function(e,t){this.value=this.value.replace("{{row-count-placeholder}}",n-1)})}),e(t).attr("data-rf-row-count",n),o.trigger("repeater_field_new_row_added",[t,i])},b=function(t){var i=e(t),n=i.parents(".give-repeatable-field-section"),a=e(t).attr("data-rf-row-count");i.attr("data-rf-row-count",--a),n.trigger("repeater_field_row_deleted")},y=function(t){if(parseInt(t.data("group-numbering"))){var i=e(".give-row-head h2 span",t),n=i.data("header-title");i.each(function(t,i){var a=e(i);a.parents(".give-template").length||a.html(n+": "+t)})}},w=function(){jQuery('[data-tooltip!=""]').qtip({content:{attr:"data-tooltip"},style:{classes:"qtip-rounded qtip-tipsy"},events:{show:function(t,i){var n=e(i.elements.target[0]);n.qtip("option","position.my",void 0===n.data("tooltip-my-position")?"bottom center":n.data("tooltip-my-position")),n.qtip("option","position.at",void 0===n.data("tooltip-target-position")?"top center":n.data("tooltip-target-position"))}}})},x={init:function(){e("body").on("click",'#give-payments-filter input[type="submit"]',this.handleBulkActions)},handleBulkActions:function(){var t=e(this).closest(".tablenav").find("select").val(),i=e(this).closest(".tablenav").find('option[value="'+t+'"]').text(),n=e('input[name="payment[]"]:checked').length,a=-1!==t.indexOf("set-status-"),o="",s="";if(t=a?"set-to-status":t,Object.keys(give_vars.bulk_action).length)for(s in give_vars.bulk_action)if(s===t)return o=a?give_vars.bulk_action[t].zero.replace("{status}",i.replace("Set To ","")):give_vars.bulk_action[t].zero,parseInt(n)?(o=1<n?give_vars.bulk_action[t].multiple:give_vars.bulk_action[t].single,window.confirm(o.replace("{payment_count}",n).replace("{status}",i.replace("Set To ","")))):(alert(o),!1);return!0}};e(function(){function n(t){t.each(function(){e(this).qtip({style:"qtip-dark qtip-tipsy",content:{text:give_vars.price_format_guide.trim()},show:"",position:{my:"bottom center",at:"top center"}})})}i(),a(),o(),g(),r(),d.init(),c.init(),l.init(),v.init(),_.init(),f.init(),u.init(),p.init(),h.init(),x.init(),w(),e("a.give-rating-link").click(function(){jQuery(this).parent().text(jQuery(this).data("rated"))});var m=e("input.give-money-field, input.give-price-field"),b=give_vars.thousands_separator,y=give_vars.decimal_separator,k="",j="",C="",Q=y===b?1:0;n(m),e("#_give_donation_levels_repeat").on("click","button.cmb-add-group-row",function(){window.setTimeout(function(){m=e("input.give-money-field, input.give-price-field"),n(m)},100)}),e("#poststuff").on("keyup","input.give-money-field, input.give-price-field",function(){k=(e(this).val().match(new RegExp(b,"g"))||[]).length,j=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(b)&&Q<k?e(this).qtip("show"):j?e(this).qtip("show"):e(this).qtip("hide"),k=j=""}),e("#poststuff").on("focusout","input.give-money-field, input.give-price-field",function(){return C=t(e(this).val(),!1),t("0",!1)===t(e(this).val(),!1)?(e(this).val(""),!1):(C=C.replace(".",y),-1!==C.indexOf("-")&&(C=C.replace("-","")),void e(this).val(C))}),e(".give-settings-page").on("click","#give-show-sub-nav",function(t){t.preventDefault();var i=e(this).next();return i.is(":hover")||i.toggleClass("give-hidden"),!1}).on("blur","#give-show-sub-nav",function(){var t=e(this).next();t.is(":hover")||t.addClass("give-hidden")}),give_render_responsive_tabs(),s()})}(jQuery),jQuery(window).resize(function(){give_render_responsive_tabs()});
|
give.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
|
6 |
* Author: WordImpress
|
7 |
* Author URI: https://wordimpress.com
|
8 |
-
* Version: 1.8.
|
9 |
* Text Domain: give
|
10 |
* Domain Path: /languages
|
11 |
* GitHub Plugin URI: https://github.com/WordImpress/Give
|
@@ -180,7 +180,7 @@ if ( ! class_exists( 'Give' ) ) :
|
|
180 |
/**
|
181 |
* Give notices Object
|
182 |
*
|
183 |
-
* @since
|
184 |
* @access public
|
185 |
*
|
186 |
* @var Give_Notices $notices
|
@@ -324,7 +324,7 @@ if ( ! class_exists( 'Give' ) ) :
|
|
324 |
|
325 |
// Plugin version
|
326 |
if ( ! defined( 'GIVE_VERSION' ) ) {
|
327 |
-
define( 'GIVE_VERSION', '1.8.
|
328 |
}
|
329 |
|
330 |
// Plugin Folder Path
|
5 |
* Description: The most robust, flexible, and intuitive way to accept donations on WordPress.
|
6 |
* Author: WordImpress
|
7 |
* Author URI: https://wordimpress.com
|
8 |
+
* Version: 1.8.15
|
9 |
* Text Domain: give
|
10 |
* Domain Path: /languages
|
11 |
* GitHub Plugin URI: https://github.com/WordImpress/Give
|
180 |
/**
|
181 |
* Give notices Object
|
182 |
*
|
183 |
+
* @since 1.8.9
|
184 |
* @access public
|
185 |
*
|
186 |
* @var Give_Notices $notices
|
324 |
|
325 |
// Plugin version
|
326 |
if ( ! defined( 'GIVE_VERSION' ) ) {
|
327 |
+
define( 'GIVE_VERSION', '1.8.15' );
|
328 |
}
|
329 |
|
330 |
// Plugin Folder Path
|
includes/actions.php
CHANGED
@@ -28,7 +28,7 @@ function give_get_actions() {
|
|
28 |
$_get_action = ! empty( $_GET['give_action'] ) ? $_GET['give_action'] : null;
|
29 |
|
30 |
// Add backward compatibility to give-action param ( $_GET )
|
31 |
-
if(
|
32 |
$_get_action = ! empty( $_GET['give-action'] ) ? $_GET['give-action'] : null;
|
33 |
}
|
34 |
|
@@ -62,7 +62,7 @@ function give_post_actions() {
|
|
62 |
|
63 |
|
64 |
// Add backward compatibility to give-action param ( $_POST ).
|
65 |
-
if(
|
66 |
$_post_action = ! empty( $_POST['give-action'] ) ? $_POST['give-action'] : null;
|
67 |
}
|
68 |
|
@@ -85,31 +85,34 @@ add_action( 'init', 'give_post_actions' );
|
|
85 |
* Connect WordPress user with Donor.
|
86 |
*
|
87 |
* @since 1.7
|
|
|
88 |
* @param int $user_id User ID
|
89 |
* @param array $user_data User Data
|
|
|
90 |
* @return void
|
91 |
*/
|
92 |
-
function give_connect_donor_to_wpuser( $user_id, $user_data ){
|
93 |
/* @var Give_Donor $donor */
|
94 |
$donor = new Give_Donor( $user_data['user_email'] );
|
95 |
|
96 |
// Validate donor id and check if do nor is already connect to wp user or not.
|
97 |
-
if( $donor->id && ! $donor->user_id ) {
|
98 |
|
99 |
// Update donor user_id.
|
100 |
-
if( $donor->update( array( 'user_id' => $user_id ) ) ) {
|
101 |
$donor_note = sprintf( esc_html__( 'WordPress user #%d is connected to #%d', 'give' ), $user_id, $donor->id );
|
102 |
$donor->add_note( $donor_note );
|
103 |
|
104 |
// Update user_id meta in payments.
|
105 |
-
if( ! empty( $donor->payment_ids ) && ( $donations = explode( ',', $donor->payment_ids ) ) ) {
|
106 |
-
foreach ( $donations as $donation
|
107 |
give_update_meta( $donation, '_give_payment_user_id', $user_id );
|
108 |
}
|
109 |
}
|
110 |
}
|
111 |
}
|
112 |
}
|
|
|
113 |
add_action( 'give_insert_user', 'give_connect_donor_to_wpuser', 10, 2 );
|
114 |
|
115 |
|
@@ -118,29 +121,49 @@ add_action( 'give_insert_user', 'give_connect_donor_to_wpuser', 10, 2 );
|
|
118 |
*
|
119 |
* Note: if location of site changes then run cron to validate licenses
|
120 |
*
|
121 |
-
* @since
|
|
|
122 |
* @return void
|
123 |
*/
|
124 |
function give_validate_license_when_site_migrated() {
|
125 |
// Store current site address if not already stored.
|
126 |
-
$
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
// Update site address.
|
129 |
-
update_option( 'give_site_address_before_migrate', $
|
130 |
|
131 |
return;
|
132 |
}
|
133 |
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
// Immediately run cron.
|
136 |
-
wp_schedule_single_event( time()
|
137 |
|
138 |
// Update site address.
|
139 |
-
update_option( 'give_site_address_before_migrate', home_url
|
140 |
}
|
141 |
|
142 |
}
|
143 |
-
|
144 |
add_action( 'admin_init', 'give_validate_license_when_site_migrated' );
|
145 |
|
146 |
|
@@ -148,11 +171,12 @@ add_action( 'admin_init', 'give_validate_license_when_site_migrated' );
|
|
148 |
* Processing after donor batch export complete
|
149 |
*
|
150 |
* @since 1.8
|
|
|
151 |
* @param $data
|
152 |
*/
|
153 |
function give_donor_batch_export_complete( $data ) {
|
154 |
// Remove donor ids cache.
|
155 |
-
if(
|
156 |
isset( $data['class'] )
|
157 |
&& 'Give_Batch_Donors_Export' === $data['class']
|
158 |
&& ! empty( $data['forms'] )
|
@@ -161,7 +185,8 @@ function give_donor_batch_export_complete( $data ) {
|
|
161 |
Give_Cache::delete( Give_Cache::get_key( $data['give_export_option']['query_id'] ) );
|
162 |
}
|
163 |
}
|
164 |
-
|
|
|
165 |
|
166 |
/**
|
167 |
* Print css for wordpress setting pages.
|
@@ -172,7 +197,7 @@ function give_admin_quick_css() {
|
|
172 |
/* @var WP_Screen $screen */
|
173 |
$screen = get_current_screen();
|
174 |
|
175 |
-
if( ! ( $screen instanceof WP_Screen ) ) {
|
176 |
return false;
|
177 |
}
|
178 |
|
@@ -180,36 +205,40 @@ function give_admin_quick_css() {
|
|
180 |
case ( 'plugins' === $screen->base || 'plugins-network' === $screen->base ):
|
181 |
?>
|
182 |
<style>
|
183 |
-
tr.active.update + tr.give-addon-notice-tr td{
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
-
tr.active + tr.give-addon-notice-tr td{
|
188 |
-
position: relative;
|
189 |
-
top:-1px;
|
190 |
-
}
|
191 |
-
tr.active + tr.give-addon-notice-tr .notice{
|
192 |
-
margin: 5px 20px 15px 40px;
|
193 |
-
}
|
194 |
|
195 |
tr.give-addon-notice-tr .dashicons {
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
199 |
border-left: 4px solid #00a0d2;
|
200 |
}
|
201 |
|
202 |
-
tr.give-addon-notice-tr td{
|
203 |
-
padding: 0!important;
|
204 |
}
|
205 |
|
206 |
-
|
207 |
margin: 5px 20px 5px 40px;
|
208 |
}
|
209 |
</style>
|
210 |
<?php
|
211 |
}
|
212 |
}
|
|
|
213 |
add_action( 'admin_head', 'give_admin_quick_css' );
|
214 |
|
215 |
|
@@ -244,7 +273,7 @@ function give_set_donation_levels_max_min_amount( $form_id ) {
|
|
244 |
|
245 |
// Set Minimum and Maximum amount for Multi Level Donation Forms
|
246 |
give_update_meta( $form_id, '_give_levels_minimum_amount', $min_amount ? give_sanitize_amount_for_db( $min_amount ) : 0 );
|
247 |
-
give_update_meta( $form_id, '_give_levels_maximum_amount', $max_amount? give_sanitize_amount_for_db( $max_amount ) : 0 );
|
248 |
}
|
249 |
|
250 |
add_action( 'give_pre_process_give_forms_meta', 'give_set_donation_levels_max_min_amount', 30 );
|
28 |
$_get_action = ! empty( $_GET['give_action'] ) ? $_GET['give_action'] : null;
|
29 |
|
30 |
// Add backward compatibility to give-action param ( $_GET )
|
31 |
+
if ( empty( $_get_action ) ) {
|
32 |
$_get_action = ! empty( $_GET['give-action'] ) ? $_GET['give-action'] : null;
|
33 |
}
|
34 |
|
62 |
|
63 |
|
64 |
// Add backward compatibility to give-action param ( $_POST ).
|
65 |
+
if ( empty( $_post_action ) ) {
|
66 |
$_post_action = ! empty( $_POST['give-action'] ) ? $_POST['give-action'] : null;
|
67 |
}
|
68 |
|
85 |
* Connect WordPress user with Donor.
|
86 |
*
|
87 |
* @since 1.7
|
88 |
+
*
|
89 |
* @param int $user_id User ID
|
90 |
* @param array $user_data User Data
|
91 |
+
*
|
92 |
* @return void
|
93 |
*/
|
94 |
+
function give_connect_donor_to_wpuser( $user_id, $user_data ) {
|
95 |
/* @var Give_Donor $donor */
|
96 |
$donor = new Give_Donor( $user_data['user_email'] );
|
97 |
|
98 |
// Validate donor id and check if do nor is already connect to wp user or not.
|
99 |
+
if ( $donor->id && ! $donor->user_id ) {
|
100 |
|
101 |
// Update donor user_id.
|
102 |
+
if ( $donor->update( array( 'user_id' => $user_id ) ) ) {
|
103 |
$donor_note = sprintf( esc_html__( 'WordPress user #%d is connected to #%d', 'give' ), $user_id, $donor->id );
|
104 |
$donor->add_note( $donor_note );
|
105 |
|
106 |
// Update user_id meta in payments.
|
107 |
+
if ( ! empty( $donor->payment_ids ) && ( $donations = explode( ',', $donor->payment_ids ) ) ) {
|
108 |
+
foreach ( $donations as $donation ) {
|
109 |
give_update_meta( $donation, '_give_payment_user_id', $user_id );
|
110 |
}
|
111 |
}
|
112 |
}
|
113 |
}
|
114 |
}
|
115 |
+
|
116 |
add_action( 'give_insert_user', 'give_connect_donor_to_wpuser', 10, 2 );
|
117 |
|
118 |
|
121 |
*
|
122 |
* Note: if location of site changes then run cron to validate licenses
|
123 |
*
|
124 |
+
* @since 1.7
|
125 |
+
* @updated 1.8.15 - Resolved issue with endless looping because of URL mismatches.
|
126 |
* @return void
|
127 |
*/
|
128 |
function give_validate_license_when_site_migrated() {
|
129 |
// Store current site address if not already stored.
|
130 |
+
$home_url_parts = parse_url( home_url() );
|
131 |
+
$home_url = isset( $home_url_parts['host'] ) ? $home_url_parts['host'] : false;
|
132 |
+
$home_url .= isset( $home_url_parts['path'] ) ? $home_url_parts['path'] : '';
|
133 |
+
$site_address_before_migrate = get_option( 'give_site_address_before_migrate' );
|
134 |
+
|
135 |
+
// Need $home_url to proceed
|
136 |
+
if ( ! $home_url ) {
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
|
140 |
+
// Save site address
|
141 |
+
if ( ! $site_address_before_migrate ) {
|
142 |
// Update site address.
|
143 |
+
update_option( 'give_site_address_before_migrate', $home_url );
|
144 |
|
145 |
return;
|
146 |
}
|
147 |
|
148 |
+
// Backwards compat. for before when we were storing URL scheme.
|
149 |
+
if ( strpos( $site_address_before_migrate, 'http' ) ) {
|
150 |
+
$site_address_before_migrate = parse_url( $site_address_before_migrate );
|
151 |
+
$site_address_before_migrate = isset( $site_address_before_migrate['host'] ) ? $site_address_before_migrate['host'] : false;
|
152 |
+
// Add path for multisite installs.
|
153 |
+
$site_address_before_migrate .= isset( $site_address_before_migrate['path'] ) ? $site_address_before_migrate['path'] : '';
|
154 |
+
}
|
155 |
+
|
156 |
+
// If the two URLs don't match run CRON.
|
157 |
+
if ( $home_url !== $site_address_before_migrate ) {
|
158 |
// Immediately run cron.
|
159 |
+
wp_schedule_single_event( time(), 'give_validate_license_when_site_migrated' );
|
160 |
|
161 |
// Update site address.
|
162 |
+
update_option( 'give_site_address_before_migrate', $home_url );
|
163 |
}
|
164 |
|
165 |
}
|
166 |
+
|
167 |
add_action( 'admin_init', 'give_validate_license_when_site_migrated' );
|
168 |
|
169 |
|
171 |
* Processing after donor batch export complete
|
172 |
*
|
173 |
* @since 1.8
|
174 |
+
*
|
175 |
* @param $data
|
176 |
*/
|
177 |
function give_donor_batch_export_complete( $data ) {
|
178 |
// Remove donor ids cache.
|
179 |
+
if (
|
180 |
isset( $data['class'] )
|
181 |
&& 'Give_Batch_Donors_Export' === $data['class']
|
182 |
&& ! empty( $data['forms'] )
|
185 |
Give_Cache::delete( Give_Cache::get_key( $data['give_export_option']['query_id'] ) );
|
186 |
}
|
187 |
}
|
188 |
+
|
189 |
+
add_action( 'give_file_export_complete', 'give_donor_batch_export_complete' );
|
190 |
|
191 |
/**
|
192 |
* Print css for wordpress setting pages.
|
197 |
/* @var WP_Screen $screen */
|
198 |
$screen = get_current_screen();
|
199 |
|
200 |
+
if ( ! ( $screen instanceof WP_Screen ) ) {
|
201 |
return false;
|
202 |
}
|
203 |
|
205 |
case ( 'plugins' === $screen->base || 'plugins-network' === $screen->base ):
|
206 |
?>
|
207 |
<style>
|
208 |
+
tr.active.update + tr.give-addon-notice-tr td {
|
209 |
+
box-shadow: none;
|
210 |
+
-webkit-box-shadow: none;
|
211 |
+
}
|
212 |
+
|
213 |
+
tr.active + tr.give-addon-notice-tr td {
|
214 |
+
position: relative;
|
215 |
+
top: -1px;
|
216 |
+
}
|
217 |
+
|
218 |
+
tr.active + tr.give-addon-notice-tr .notice {
|
219 |
+
margin: 5px 20px 15px 40px;
|
220 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
tr.give-addon-notice-tr .dashicons {
|
223 |
+
color: #f56e28;
|
224 |
+
}
|
225 |
+
|
226 |
+
tr.give-addon-notice-tr td {
|
227 |
border-left: 4px solid #00a0d2;
|
228 |
}
|
229 |
|
230 |
+
tr.give-addon-notice-tr td {
|
231 |
+
padding: 0 !important;
|
232 |
}
|
233 |
|
234 |
+
tr.active.update + tr.give-addon-notice-tr .notice {
|
235 |
margin: 5px 20px 5px 40px;
|
236 |
}
|
237 |
</style>
|
238 |
<?php
|
239 |
}
|
240 |
}
|
241 |
+
|
242 |
add_action( 'admin_head', 'give_admin_quick_css' );
|
243 |
|
244 |
|
273 |
|
274 |
// Set Minimum and Maximum amount for Multi Level Donation Forms
|
275 |
give_update_meta( $form_id, '_give_levels_minimum_amount', $min_amount ? give_sanitize_amount_for_db( $min_amount ) : 0 );
|
276 |
+
give_update_meta( $form_id, '_give_levels_maximum_amount', $max_amount ? give_sanitize_amount_for_db( $max_amount ) : 0 );
|
277 |
}
|
278 |
|
279 |
add_action( 'give_pre_process_give_forms_meta', 'give_set_donation_levels_max_min_amount', 30 );
|
includes/admin/class-addon-activation-banner.php
CHANGED
@@ -181,7 +181,7 @@ class Give_Addon_Activation_Banner {
|
|
181 |
}
|
182 |
</style>
|
183 |
|
184 |
-
<div class="updated give-addon-alert">
|
185 |
|
186 |
<img src="<?php echo GIVE_PLUGIN_URL; ?>assets/images/svg/give-icon-full-circle.svg" class="give-logo"/>
|
187 |
|
181 |
}
|
182 |
</style>
|
183 |
|
184 |
+
<div class="updated give-addon-alert give-notice" style="display: none">
|
185 |
|
186 |
<img src="<?php echo GIVE_PLUGIN_URL; ?>assets/images/svg/give-icon-full-circle.svg" class="give-logo"/>
|
187 |
|
includes/admin/class-i18n-module.php
CHANGED
@@ -221,7 +221,7 @@ class Give_i18n_Banner {
|
|
221 |
}
|
222 |
|
223 |
</style>
|
224 |
-
<div id="give-i18n-notice" class="give-addon-alert updated" style="">
|
225 |
|
226 |
<a href="https://wordpress.org/support/register.php" class="alignleft give-i18n-icon" style="margin:0" target="_blank"><span class="dashicons dashicons-translation"
|
227 |
style="font-size: 110px; text-decoration: none;"></span></a>
|
221 |
}
|
222 |
|
223 |
</style>
|
224 |
+
<div id="give-i18n-notice" class="give-addon-alert updated give-notice" style="display: none">
|
225 |
|
226 |
<a href="https://wordpress.org/support/register.php" class="alignleft give-i18n-icon" style="margin:0" target="_blank"><span class="dashicons dashicons-translation"
|
227 |
style="font-size: 110px; text-decoration: none;"></span></a>
|
includes/admin/payments/class-payments-table.php
CHANGED
@@ -413,7 +413,7 @@ class Give_Payment_History_Table extends WP_List_Table {
|
|
413 |
|
414 |
case 'amount' :
|
415 |
$amount = ! empty( $payment->total ) ? $payment->total : 0;
|
416 |
-
$value = give_currency_filter( give_format_amount( $amount, array( 'sanitize' => false ) ), give_get_payment_currency_code( $payment->ID ) );
|
417 |
$value .= sprintf( '<br><small>%1$s %2$s</small>', __( 'via', 'give' ), give_get_gateway_admin_label( $payment->gateway ) );
|
418 |
break;
|
419 |
|
413 |
|
414 |
case 'amount' :
|
415 |
$amount = ! empty( $payment->total ) ? $payment->total : 0;
|
416 |
+
$value = give_currency_filter( give_format_amount( $amount, array( 'sanitize' => false, 'donation_id' => $payment->ID ) ), give_get_payment_currency_code( $payment->ID ) );
|
417 |
$value .= sprintf( '<br><small>%1$s %2$s</small>', __( 'via', 'give' ), give_get_gateway_admin_label( $payment->gateway ) );
|
418 |
break;
|
419 |
|
includes/admin/tools/data/class-give-tools-recount-income.php
CHANGED
@@ -87,7 +87,7 @@ class Give_Tools_Recount_Income extends Give_Batch_Export {
|
|
87 |
$totals = 0;
|
88 |
}
|
89 |
|
90 |
-
$total = round( $total,
|
91 |
|
92 |
$this->store_data( 'give_temp_recount_earnings', $total );
|
93 |
|
87 |
$totals = 0;
|
88 |
}
|
89 |
|
90 |
+
$total = round( $total, give_get_price_decimals() );
|
91 |
|
92 |
$this->store_data( 'give_temp_recount_earnings', $total );
|
93 |
|
includes/admin/tools/import/class-give-import-donations.php
CHANGED
@@ -432,9 +432,6 @@ if ( ! class_exists( 'Give_Import_Donations' ) ) {
|
|
432 |
|
433 |
<?php
|
434 |
$raw_key = $this->get_importer( $csv, 0, $delimiter );
|
435 |
-
$donations = give_import_donations_options();
|
436 |
-
$donors = give_import_donor_options();
|
437 |
-
$forms = give_import_donation_form_options();
|
438 |
$mapto = (array) ( isset( $_REQUEST['mapto'] ) ? $_REQUEST['mapto'] : array() );
|
439 |
|
440 |
foreach ( $raw_key as $index => $value ) {
|
@@ -443,7 +440,7 @@ if ( ! class_exists( 'Give_Import_Donations' ) ) {
|
|
443 |
<th><?php echo $value; ?></th>
|
444 |
<th>
|
445 |
<?php
|
446 |
-
$this->get_columns( $index, $
|
447 |
?>
|
448 |
</th>
|
449 |
</tr>
|
@@ -459,10 +456,13 @@ if ( ! class_exists( 'Give_Import_Donations' ) ) {
|
|
459 |
* @return string
|
460 |
*/
|
461 |
public function selected( $option_value, $value ) {
|
|
|
|
|
|
|
462 |
$selected = '';
|
463 |
if ( stristr( $value, $option_value ) ) {
|
464 |
$selected = 'selected';
|
465 |
-
} elseif ( strrpos( $value, '_' ) && stristr( $option_value, 'Import as Meta' ) ) {
|
466 |
$selected = 'selected';
|
467 |
}
|
468 |
|
@@ -473,72 +473,88 @@ if ( ! class_exists( 'Give_Import_Donations' ) ) {
|
|
473 |
* Print the columns from the CSV.
|
474 |
*
|
475 |
* @since 1.8.14
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
*/
|
477 |
-
|
478 |
$default = give_import_default_options();
|
479 |
$current_mapto = (string) ( ! empty( $mapto[ $index ] ) ? $mapto[ $index ] : '' );
|
480 |
?>
|
481 |
<select name="mapto[<?php echo $index; ?>]">
|
482 |
-
<?php
|
483 |
-
|
484 |
-
|
485 |
-
if ( empty( $checked ) ) {
|
486 |
-
$checked = $this->selected( $option_value, $value );
|
487 |
-
}
|
488 |
-
?>
|
489 |
-
<option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option>
|
490 |
-
<?php
|
491 |
-
}
|
492 |
-
?>
|
493 |
-
<optgroup label="Donations">
|
494 |
<?php
|
495 |
-
|
496 |
-
$checked = ( ( $current_mapto === $option ) ? 'selected' : false );
|
497 |
-
if ( empty( $checked ) ) {
|
498 |
-
$checked = $this->selected( $option_value, $value );
|
499 |
-
}
|
500 |
-
?>
|
501 |
-
<option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option>
|
502 |
-
<?php
|
503 |
-
}
|
504 |
?>
|
505 |
</optgroup>
|
506 |
|
507 |
-
<optgroup label="Donors">
|
508 |
<?php
|
509 |
-
|
510 |
-
$checked = ( ( $current_mapto === $option ) ? 'selected' : false );
|
511 |
-
if ( empty( $checked ) ) {
|
512 |
-
$checked = $this->selected( $option_value, $value );
|
513 |
-
}
|
514 |
-
?>
|
515 |
-
<option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option>
|
516 |
-
<?php
|
517 |
-
}
|
518 |
?>
|
519 |
</optgroup>
|
520 |
|
521 |
-
<optgroup label="Forms">
|
522 |
<?php
|
523 |
-
|
524 |
-
$checked = ( ( $current_mapto === $option ) ? 'selected' : false );
|
525 |
-
if ( empty( $checked ) ) {
|
526 |
-
$checked = $this->selected( $option_value, $value );
|
527 |
-
}
|
528 |
-
?>
|
529 |
-
<option value="<?php echo $option; ?>" <?php echo $checked; ?> ><?php echo $option_value; ?></option>
|
530 |
-
<?php
|
531 |
-
}
|
532 |
?>
|
533 |
</optgroup>
|
534 |
|
535 |
<?php
|
536 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
?>
|
538 |
</select>
|
539 |
<?php
|
540 |
}
|
541 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
/**
|
543 |
* Get column count of csv file.
|
544 |
*
|
432 |
|
433 |
<?php
|
434 |
$raw_key = $this->get_importer( $csv, 0, $delimiter );
|
|
|
|
|
|
|
435 |
$mapto = (array) ( isset( $_REQUEST['mapto'] ) ? $_REQUEST['mapto'] : array() );
|
436 |
|
437 |
foreach ( $raw_key as $index => $value ) {
|
440 |
<th><?php echo $value; ?></th>
|
441 |
<th>
|
442 |
<?php
|
443 |
+
$this->get_columns( $index, $value, $mapto );
|
444 |
?>
|
445 |
</th>
|
446 |
</tr>
|
456 |
* @return string
|
457 |
*/
|
458 |
public function selected( $option_value, $value ) {
|
459 |
+
$option_value = strtolower( $option_value );
|
460 |
+
$value = strtolower( $value );
|
461 |
+
|
462 |
$selected = '';
|
463 |
if ( stristr( $value, $option_value ) ) {
|
464 |
$selected = 'selected';
|
465 |
+
} elseif ( strrpos( $value, '_' ) && stristr( $option_value, __( 'Import as Meta', 'give' ) ) ) {
|
466 |
$selected = 'selected';
|
467 |
}
|
468 |
|
473 |
* Print the columns from the CSV.
|
474 |
*
|
475 |
* @since 1.8.14
|
476 |
+
* @access private
|
477 |
+
*
|
478 |
+
* @param string $index
|
479 |
+
* @param bool $value
|
480 |
+
* @param array $mapto
|
481 |
+
*
|
482 |
+
* @return void
|
483 |
*/
|
484 |
+
private function get_columns( $index, $value = false, $mapto = array() ) {
|
485 |
$default = give_import_default_options();
|
486 |
$current_mapto = (string) ( ! empty( $mapto[ $index ] ) ? $mapto[ $index ] : '' );
|
487 |
?>
|
488 |
<select name="mapto[<?php echo $index; ?>]">
|
489 |
+
<?php $this->get_dropdown_option_html( $default, $current_mapto, $value ); ?>
|
490 |
+
|
491 |
+
<optgroup label="<?php _e( 'Donations', 'give' ); ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
<?php
|
493 |
+
$this->get_dropdown_option_html( give_import_donations_options(), $current_mapto, $value );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
?>
|
495 |
</optgroup>
|
496 |
|
497 |
+
<optgroup label="<?php _e( 'Donors', 'give' ); ?>">
|
498 |
<?php
|
499 |
+
$this->get_dropdown_option_html( give_import_donor_options(), $current_mapto, $value );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
500 |
?>
|
501 |
</optgroup>
|
502 |
|
503 |
+
<optgroup label="<?php _e( 'Forms', 'give' ); ?>">
|
504 |
<?php
|
505 |
+
$this->get_dropdown_option_html( give_import_donation_form_options(), $current_mapto, $value );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
?>
|
507 |
</optgroup>
|
508 |
|
509 |
<?php
|
510 |
+
/**
|
511 |
+
* Fire the action
|
512 |
+
* You can use this filter to add new options.
|
513 |
+
*
|
514 |
+
* @since 1.8.15
|
515 |
+
*/
|
516 |
+
do_action( 'give_import_dropdown_option', $index, $value, $mapto, $current_mapto );
|
517 |
?>
|
518 |
</select>
|
519 |
<?php
|
520 |
}
|
521 |
|
522 |
+
/**
|
523 |
+
* Print the option html for select in importer
|
524 |
+
*
|
525 |
+
* @since 1.8.15
|
526 |
+
* @access public
|
527 |
+
*
|
528 |
+
* @param array $options
|
529 |
+
* @param string $current_mapto
|
530 |
+
* @param bool $value
|
531 |
+
*
|
532 |
+
* @return void
|
533 |
+
*/
|
534 |
+
public function get_dropdown_option_html( $options, $current_mapto, $value = false ) {
|
535 |
+
foreach ( $options as $option => $option_value ) {
|
536 |
+
$option_value_texts = (array) $option_value;
|
537 |
+
$option_text = $option_value_texts[0];
|
538 |
+
|
539 |
+
$checked = ( ( $current_mapto === $option ) ? 'selected' : false );
|
540 |
+
if ( empty( $checked ) ) {
|
541 |
+
foreach ( $option_value_texts as $option_value_text ) {
|
542 |
+
$checked = $this->selected( $option_value_text, $value );
|
543 |
+
if ( $checked ) {
|
544 |
+
break;
|
545 |
+
}
|
546 |
+
}
|
547 |
+
}
|
548 |
+
|
549 |
+
echo sprintf(
|
550 |
+
'<option value="%1$s" %2$s >%3$s</option>',
|
551 |
+
$option,
|
552 |
+
$checked,
|
553 |
+
$option_text
|
554 |
+
);
|
555 |
+
}
|
556 |
+
}
|
557 |
+
|
558 |
/**
|
559 |
* Get column count of csv file.
|
560 |
*
|
includes/admin/tools/logs/class-sales-logs-list-table.php
CHANGED
@@ -82,7 +82,7 @@ class Give_Sales_Log_Table extends WP_List_Table {
|
|
82 |
);
|
83 |
|
84 |
case 'amount' :
|
85 |
-
return give_currency_filter( give_format_amount( $item['amount'], array( 'sanitize' => false ) ) );
|
86 |
|
87 |
case 'status' :
|
88 |
|
82 |
);
|
83 |
|
84 |
case 'amount' :
|
85 |
+
return give_currency_filter( give_format_amount( $item['amount'], array( 'sanitize' => false, 'donation_id' => $item['payment_id'] ) ), give_get_payment_currency_code( $item['payment_id'] ) );
|
86 |
|
87 |
case 'status' :
|
88 |
|
includes/class-give-html-elements.php
CHANGED
@@ -109,7 +109,7 @@ class Give_HTML_Elements {
|
|
109 |
'selected' => 0,
|
110 |
'chosen' => false,
|
111 |
'number' => 30,
|
112 |
-
'placeholder' => esc_attr__( '
|
113 |
'data' => array(
|
114 |
'search-type' => 'form',
|
115 |
),
|
109 |
'selected' => 0,
|
110 |
'chosen' => false,
|
111 |
'number' => 30,
|
112 |
+
'placeholder' => esc_attr__( 'All Forms', 'give' ),
|
113 |
'data' => array(
|
114 |
'search-type' => 'form',
|
115 |
),
|
includes/class-give-license-handler.php
CHANGED
@@ -161,7 +161,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
161 |
|
162 |
// Add Setting for Give Add-on activation status.
|
163 |
$is_addon_activated = get_option( 'give_is_addon_activated' );
|
164 |
-
if( ! $is_addon_activated && is_object( $this ) && sizeof( $this ) > 0 ) {
|
165 |
update_option( 'give_is_addon_activated', true );
|
166 |
Give_Cache::set( 'give_cache_hide_license_notice_after_activation', true, DAY_IN_SECONDS );
|
167 |
}
|
@@ -326,7 +326,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
326 |
*/
|
327 |
public function activate_license() {
|
328 |
// Bailout.
|
329 |
-
if( ! $this->__is_user_can_edit_license() ) {
|
330 |
return;
|
331 |
}
|
332 |
|
@@ -381,7 +381,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
381 |
set_site_transient( 'update_plugins', null );
|
382 |
|
383 |
// Add license data.
|
384 |
-
update_option(
|
385 |
|
386 |
// Add license key.
|
387 |
give_update_option( "{$this->item_shortname}_license_key", $this->license );
|
@@ -402,7 +402,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
402 |
*/
|
403 |
public function deactivate_license() {
|
404 |
// Bailout.
|
405 |
-
if( ! $this->__is_user_can_edit_license() ) {
|
406 |
return;
|
407 |
}
|
408 |
|
@@ -458,7 +458,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
458 |
}
|
459 |
|
460 |
// Bailout.
|
461 |
-
if( ! $this->is_license( $license_data ) ) {
|
462 |
return;
|
463 |
}
|
464 |
|
@@ -513,10 +513,13 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
513 |
return;
|
514 |
}
|
515 |
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
|
|
|
|
|
|
520 |
if ( ! ( $subscription_data = $this->get_license_info( 'check_subscription', true ) ) ) {
|
521 |
return;
|
522 |
}
|
@@ -526,17 +529,17 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
526 |
$subscriptions = get_option( 'give_subscriptions', array() );
|
527 |
|
528 |
// Update subscription data only if subscription does not exist already.
|
529 |
-
$subscriptions[ $subscription_data['id'] ]
|
530 |
|
531 |
|
532 |
// Initiate default set of license for subscription.
|
533 |
-
if( ! isset( $subscriptions[ $subscription_data['id'] ]['licenses'] ) ) {
|
534 |
-
$subscriptions[ $subscription_data['id']]['licenses'] = array();
|
535 |
}
|
536 |
|
537 |
// Store licenses for subscription.
|
538 |
if ( ! in_array( $this->license, $subscriptions[ $subscription_data['id'] ]['licenses'] ) ) {
|
539 |
-
$subscriptions[ $subscription_data['id']]['licenses'][] = $this->license;
|
540 |
}
|
541 |
|
542 |
update_option( 'give_subscriptions', $subscriptions );
|
@@ -625,11 +628,11 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
625 |
urldecode( $subscription['invoice_url'] ),
|
626 |
$subscription['payment_id'],
|
627 |
"{$this->checkout_url}?edd_license_key={$subscription['license_key']}&utm_campaign=admin&utm_source=licenses&utm_medium=expired",
|
628 |
-
Give()->notices->get_dismiss_link(array(
|
629 |
-
'title'
|
630 |
-
'dismissible_type'
|
631 |
-
'dismiss_interval'
|
632 |
-
))
|
633 |
),
|
634 |
'dismissible_type' => 'user',
|
635 |
'dismiss_interval' => 'shortly',
|
@@ -644,11 +647,11 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
644 |
urldecode( $subscription['invoice_url'] ),
|
645 |
$subscription['payment_id'],
|
646 |
"{$this->checkout_url}?edd_license_key={$subscription['license_key']}&utm_campaign=admin&utm_source=licenses&utm_medium=expired",
|
647 |
-
Give()->notices->get_dismiss_link(array(
|
648 |
-
'title'
|
649 |
-
'dismissible_type'
|
650 |
-
'dismiss_interval'
|
651 |
-
))
|
652 |
),
|
653 |
'dismissible_type' => 'user',
|
654 |
'dismiss_interval' => 'shortly',
|
@@ -716,7 +719,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
716 |
*
|
717 |
* @return bool
|
718 |
*/
|
719 |
-
public function is_license( $licence_data = null ){
|
720 |
$license_data = empty( $licence_data ) ? $this->license_data : $licence_data;
|
721 |
|
722 |
if ( apply_filters( 'give_is_license', ( is_object( $license_data ) && ! empty( $license_data ) && property_exists( $license_data, 'license' ) ) ) ) {
|
@@ -838,7 +841,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
838 |
|
839 |
// Security check.
|
840 |
if (
|
841 |
-
isset( $_POST[ $this->item_shortname . '_license_key-nonce'] ) &&
|
842 |
! wp_verify_nonce( $_REQUEST[ $this->item_shortname . '_license_key-nonce' ], $this->item_shortname . '_license_key-nonce' )
|
843 |
) {
|
844 |
wp_die( __( 'Nonce verification failed.', 'give' ), __( 'Error', 'give' ), array( 'response' => 403 ) );
|
@@ -860,7 +863,7 @@ if ( ! class_exists( 'Give_License' ) ) :
|
|
860 |
* @return mixed
|
861 |
*/
|
862 |
public function get_license_info( $edd_action = '', $response_in_array = false ) {
|
863 |
-
if( empty( $edd_action ) ) {
|
864 |
return false;
|
865 |
}
|
866 |
|
161 |
|
162 |
// Add Setting for Give Add-on activation status.
|
163 |
$is_addon_activated = get_option( 'give_is_addon_activated' );
|
164 |
+
if ( ! $is_addon_activated && is_object( $this ) && sizeof( $this ) > 0 ) {
|
165 |
update_option( 'give_is_addon_activated', true );
|
166 |
Give_Cache::set( 'give_cache_hide_license_notice_after_activation', true, DAY_IN_SECONDS );
|
167 |
}
|
326 |
*/
|
327 |
public function activate_license() {
|
328 |
// Bailout.
|
329 |
+
if ( ! $this->__is_user_can_edit_license() ) {
|
330 |
return;
|
331 |
}
|
332 |
|
381 |
set_site_transient( 'update_plugins', null );
|
382 |
|
383 |
// Add license data.
|
384 |
+
update_option( "{$this->item_shortname}_license_active", $license_data );
|
385 |
|
386 |
// Add license key.
|
387 |
give_update_option( "{$this->item_shortname}_license_key", $this->license );
|
402 |
*/
|
403 |
public function deactivate_license() {
|
404 |
// Bailout.
|
405 |
+
if ( ! $this->__is_user_can_edit_license() ) {
|
406 |
return;
|
407 |
}
|
408 |
|
458 |
}
|
459 |
|
460 |
// Bailout.
|
461 |
+
if ( ! $this->is_license( $license_data ) ) {
|
462 |
return;
|
463 |
}
|
464 |
|
513 |
return;
|
514 |
}
|
515 |
|
516 |
+
/**
|
517 |
+
* Make sure there are no api errors.
|
518 |
+
*
|
519 |
+
* Do not get confused with edd_action check_subscription.
|
520 |
+
* By default edd software licensing api does not have api to check subscription.
|
521 |
+
* This is a custom feature to check subscriptions.
|
522 |
+
*/
|
523 |
if ( ! ( $subscription_data = $this->get_license_info( 'check_subscription', true ) ) ) {
|
524 |
return;
|
525 |
}
|
529 |
$subscriptions = get_option( 'give_subscriptions', array() );
|
530 |
|
531 |
// Update subscription data only if subscription does not exist already.
|
532 |
+
$subscriptions[ $subscription_data['id'] ] = $subscription_data;
|
533 |
|
534 |
|
535 |
// Initiate default set of license for subscription.
|
536 |
+
if ( ! isset( $subscriptions[ $subscription_data['id'] ]['licenses'] ) ) {
|
537 |
+
$subscriptions[ $subscription_data['id'] ]['licenses'] = array();
|
538 |
}
|
539 |
|
540 |
// Store licenses for subscription.
|
541 |
if ( ! in_array( $this->license, $subscriptions[ $subscription_data['id'] ]['licenses'] ) ) {
|
542 |
+
$subscriptions[ $subscription_data['id'] ]['licenses'][] = $this->license;
|
543 |
}
|
544 |
|
545 |
update_option( 'give_subscriptions', $subscriptions );
|
628 |
urldecode( $subscription['invoice_url'] ),
|
629 |
$subscription['payment_id'],
|
630 |
"{$this->checkout_url}?edd_license_key={$subscription['license_key']}&utm_campaign=admin&utm_source=licenses&utm_medium=expired",
|
631 |
+
Give()->notices->get_dismiss_link( array(
|
632 |
+
'title' => __( 'Click here if already renewed', 'give' ),
|
633 |
+
'dismissible_type' => 'user',
|
634 |
+
'dismiss_interval' => 'permanent',
|
635 |
+
) )
|
636 |
),
|
637 |
'dismissible_type' => 'user',
|
638 |
'dismiss_interval' => 'shortly',
|
647 |
urldecode( $subscription['invoice_url'] ),
|
648 |
$subscription['payment_id'],
|
649 |
"{$this->checkout_url}?edd_license_key={$subscription['license_key']}&utm_campaign=admin&utm_source=licenses&utm_medium=expired",
|
650 |
+
Give()->notices->get_dismiss_link( array(
|
651 |
+
'title' => __( 'Click here if already renewed', 'give' ),
|
652 |
+
'dismissible_type' => 'user',
|
653 |
+
'dismiss_interval' => 'permanent',
|
654 |
+
) )
|
655 |
),
|
656 |
'dismissible_type' => 'user',
|
657 |
'dismiss_interval' => 'shortly',
|
719 |
*
|
720 |
* @return bool
|
721 |
*/
|
722 |
+
public function is_license( $licence_data = null ) {
|
723 |
$license_data = empty( $licence_data ) ? $this->license_data : $licence_data;
|
724 |
|
725 |
if ( apply_filters( 'give_is_license', ( is_object( $license_data ) && ! empty( $license_data ) && property_exists( $license_data, 'license' ) ) ) ) {
|
841 |
|
842 |
// Security check.
|
843 |
if (
|
844 |
+
isset( $_POST[ $this->item_shortname . '_license_key-nonce' ] ) &&
|
845 |
! wp_verify_nonce( $_REQUEST[ $this->item_shortname . '_license_key-nonce' ], $this->item_shortname . '_license_key-nonce' )
|
846 |
) {
|
847 |
wp_die( __( 'Nonce verification failed.', 'give' ), __( 'Error', 'give' ), array( 'response' => 403 ) );
|
863 |
* @return mixed
|
864 |
*/
|
865 |
public function get_license_info( $edd_action = '', $response_in_array = false ) {
|
866 |
+
if ( empty( $edd_action ) ) {
|
867 |
return false;
|
868 |
}
|
869 |
|
includes/class-give-session.php
CHANGED
@@ -225,7 +225,7 @@ class Give_Session {
|
|
225 |
* @access public
|
226 |
*
|
227 |
* @param string $key Session key.
|
228 |
-
* @param
|
229 |
*
|
230 |
* @return string Session variable.
|
231 |
*/
|
225 |
* @access public
|
226 |
*
|
227 |
* @param string $key Session key.
|
228 |
+
* @param mixed $value Session variable.
|
229 |
*
|
230 |
* @return string Session variable.
|
231 |
*/
|
includes/class-notices.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* @subpackage Admin/Notices
|
7 |
* @copyright Copyright (c) 2016, WordImpress
|
8 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
9 |
-
* @since 1.
|
10 |
*/
|
11 |
|
12 |
// Exit if accessed directly.
|
@@ -17,13 +17,13 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
17 |
/**
|
18 |
* Give_Notices Class
|
19 |
*
|
20 |
-
* @since 1.
|
21 |
*/
|
22 |
class Give_Notices {
|
23 |
/**
|
24 |
* List of notices
|
25 |
* @var array
|
26 |
-
* @since 1.8
|
27 |
* @access private
|
28 |
*/
|
29 |
private static $notices = array();
|
@@ -50,7 +50,7 @@ class Give_Notices {
|
|
50 |
/**
|
51 |
* Get things started.
|
52 |
*
|
53 |
-
* @since 1.
|
54 |
*/
|
55 |
public function __construct() {
|
56 |
add_action( 'admin_notices', array( $this, 'render_admin_notices' ), 999 );
|
6 |
* @subpackage Admin/Notices
|
7 |
* @copyright Copyright (c) 2016, WordImpress
|
8 |
* @license https://opensource.org/licenses/gpl-license GNU Public License
|
9 |
+
* @since 1.8.9
|
10 |
*/
|
11 |
|
12 |
// Exit if accessed directly.
|
17 |
/**
|
18 |
* Give_Notices Class
|
19 |
*
|
20 |
+
* @since 1.8.9
|
21 |
*/
|
22 |
class Give_Notices {
|
23 |
/**
|
24 |
* List of notices
|
25 |
* @var array
|
26 |
+
* @since 1.8.9
|
27 |
* @access private
|
28 |
*/
|
29 |
private static $notices = array();
|
50 |
/**
|
51 |
* Get things started.
|
52 |
*
|
53 |
+
* @since 1.8.9
|
54 |
*/
|
55 |
public function __construct() {
|
56 |
add_action( 'admin_notices', array( $this, 'render_admin_notices' ), 999 );
|
includes/deprecated/deprecated-functions.php
CHANGED
@@ -641,4 +641,39 @@ function give_build_paypal_item_title( $payment_data ) {
|
|
641 |
|
642 |
return give_payment_gateway_item_title( $payment_data );
|
643 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
644 |
}
|
641 |
|
642 |
return give_payment_gateway_item_title( $payment_data );
|
643 |
|
644 |
+
}
|
645 |
+
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Set the number of decimal places per currency
|
649 |
+
*
|
650 |
+
* @since 1.0
|
651 |
+
* @since 1.6 $decimals parameter removed from function params
|
652 |
+
* @deprecated 1.8.15
|
653 |
+
* *
|
654 |
+
* @return int $decimals
|
655 |
+
*/
|
656 |
+
function give_currency_decimal_filter() {
|
657 |
+
// Set default number of decimals.
|
658 |
+
$decimals = give_get_price_decimals();
|
659 |
+
|
660 |
+
// Get number of decimals with backward compatibility ( version < 1.6 )
|
661 |
+
if ( 1 <= func_num_args() ) {
|
662 |
+
$decimals = ( false === func_get_arg( 0 ) ? $decimals : absint( func_get_arg( 0 ) ) );
|
663 |
+
}
|
664 |
+
|
665 |
+
$currency = give_get_currency();
|
666 |
+
|
667 |
+
switch ( $currency ) {
|
668 |
+
// case 'RIAL' :
|
669 |
+
case 'JPY' :
|
670 |
+
case 'KRW' :
|
671 |
+
// case 'TWD' :
|
672 |
+
// case 'HUF' :
|
673 |
+
|
674 |
+
$decimals = 0;
|
675 |
+
break;
|
676 |
+
}
|
677 |
+
|
678 |
+
return apply_filters( 'give_currency_decimal_count', $decimals, $currency );
|
679 |
}
|
includes/formatting.php
CHANGED
@@ -14,54 +14,140 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
exit;
|
15 |
}
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
/**
|
19 |
* Get decimal count
|
20 |
*
|
21 |
* @since 1.6
|
22 |
*
|
|
|
|
|
23 |
* @return mixed
|
24 |
*/
|
25 |
-
function give_get_price_decimals() {
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
* Get thousand separator
|
31 |
*
|
|
|
|
|
32 |
* @since 1.6
|
33 |
*
|
34 |
* @return mixed
|
35 |
*/
|
36 |
-
function give_get_price_thousand_separator() {
|
37 |
-
$
|
38 |
-
$thousand_separator = isset( $give_options['thousands_separator'] ) ? $give_options['thousands_separator'] : ',';
|
39 |
-
$thousand_separator = empty( $thousand_separator ) ? ' ' : $thousand_separator;
|
40 |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
* Get decimal separator
|
46 |
*
|
|
|
|
|
47 |
* @since 1.6
|
48 |
*
|
49 |
* @return mixed
|
50 |
*/
|
51 |
-
function give_get_price_decimal_separator() {
|
52 |
-
$
|
53 |
-
'.' => ',',
|
54 |
-
',' => '.',
|
55 |
-
);
|
56 |
-
|
57 |
-
$thousand_separator = give_get_price_thousand_separator();
|
58 |
-
$default_decimal_separator = in_array( $thousand_separator, $default_decimal_separators ) ?
|
59 |
-
$default_decimal_separators[$thousand_separator] :
|
60 |
-
'.';
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
|
@@ -236,8 +322,8 @@ function give_sanitize_amount( $number, $dp = false, $trim_zeros = false ) {
|
|
236 |
*
|
237 |
* @since 1.0
|
238 |
*
|
239 |
-
* @param string $amount
|
240 |
-
* @param array $args
|
241 |
*
|
242 |
* @return string $amount Newly formatted amount or Price Not Available
|
243 |
*/
|
@@ -248,18 +334,25 @@ function give_format_amount( $amount, $args = array() ) {
|
|
248 |
}
|
249 |
|
250 |
$default_args = array(
|
251 |
-
'decimal'
|
252 |
-
'sanitize'
|
253 |
-
'
|
|
|
254 |
);
|
255 |
|
256 |
$args = wp_parse_args( $args, $default_args );
|
257 |
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
$formatted = 0;
|
259 |
-
$
|
260 |
-
$
|
261 |
-
$
|
262 |
-
$
|
263 |
|
264 |
if ( ! empty( $amount ) ) {
|
265 |
// Sanitize amount before formatting.
|
@@ -306,6 +399,11 @@ function give_format_amount( $amount, $args = array() ) {
|
|
306 |
}
|
307 |
}
|
308 |
|
|
|
|
|
|
|
|
|
|
|
309 |
return apply_filters( 'give_format_amount', $formatted, $amount, $decimals, $decimal_sep, $thousands_sep, $currency, $args );
|
310 |
}
|
311 |
|
@@ -325,11 +423,15 @@ function give_format_amount( $amount, $args = array() ) {
|
|
325 |
* @return float|string formatted amount number with large number names.
|
326 |
*/
|
327 |
function give_human_format_large_amount( $amount, $args = array() ) {
|
328 |
-
|
329 |
-
|
330 |
-
|
|
|
331 |
|
332 |
-
|
|
|
|
|
|
|
333 |
|
334 |
// Get thousand separator.
|
335 |
$thousands_sep = give_get_price_thousand_separator();
|
@@ -483,46 +585,6 @@ function give_currency_filter( $price = '', $currency = '', $decode_currency = f
|
|
483 |
return $formatted;
|
484 |
}
|
485 |
|
486 |
-
/**
|
487 |
-
* Set the number of decimal places per currency
|
488 |
-
*
|
489 |
-
* @since 1.0
|
490 |
-
* @since 1.6 $decimals parameter removed from function params
|
491 |
-
* *
|
492 |
-
* @return int $decimals
|
493 |
-
*/
|
494 |
-
function give_currency_decimal_filter() {
|
495 |
-
|
496 |
-
remove_filter( 'give_sanitize_amount_decimals', 'give_currency_decimal_filter' );
|
497 |
-
|
498 |
-
// Set default number of decimals.
|
499 |
-
$decimals = give_get_price_decimals();
|
500 |
-
|
501 |
-
add_filter( 'give_sanitize_amount_decimals', 'give_currency_decimal_filter' );
|
502 |
-
|
503 |
-
// Get number of decimals with backward compatibility ( version < 1.6 )
|
504 |
-
if ( 1 <= func_num_args() ) {
|
505 |
-
$decimals = ( false === func_get_arg( 0 ) ? $decimals : absint( func_get_arg( 0 ) ) );
|
506 |
-
}
|
507 |
-
|
508 |
-
$currency = give_get_currency();
|
509 |
-
|
510 |
-
switch ( $currency ) {
|
511 |
-
case 'RIAL' :
|
512 |
-
case 'JPY' :
|
513 |
-
case 'TWD' :
|
514 |
-
case 'HUF' :
|
515 |
-
|
516 |
-
$decimals = 0;
|
517 |
-
break;
|
518 |
-
}
|
519 |
-
|
520 |
-
return apply_filters( 'give_currency_decimal_count', $decimals, $currency );
|
521 |
-
}
|
522 |
-
|
523 |
-
add_filter( 'give_sanitize_amount_decimals', 'give_currency_decimal_filter' );
|
524 |
-
add_filter( 'give_format_amount_decimals', 'give_currency_decimal_filter' );
|
525 |
-
|
526 |
|
527 |
/**
|
528 |
* Get date format string on basis of given context.
|
14 |
exit;
|
15 |
}
|
16 |
|
17 |
+
/**
|
18 |
+
* Get Currency Formatting Settings for each donation.
|
19 |
+
*
|
20 |
+
* @param int|string $id_or_currency_code Donation ID or Currency code.
|
21 |
+
*
|
22 |
+
* @since 1.8.15
|
23 |
+
*
|
24 |
+
* @return mixed
|
25 |
+
*/
|
26 |
+
function give_get_currency_formatting_settings( $id_or_currency_code = null ) {
|
27 |
+
$give_options = give_get_settings();
|
28 |
+
$setting = array();
|
29 |
+
|
30 |
+
if ( ! empty( $id_or_currency_code ) ) {
|
31 |
+
$currencies = give_get_currencies('all');
|
32 |
+
|
33 |
+
// Set default formatting setting only if currency not set as global currency.
|
34 |
+
|
35 |
+
if( is_string( $id_or_currency_code ) && ( $id_or_currency_code !== $give_options['currency'] ) && array_key_exists( $id_or_currency_code, $currencies ) ) {
|
36 |
+
$setting = $currencies[ $id_or_currency_code ]['setting'];
|
37 |
+
}elseif ( is_numeric( $id_or_currency_code ) && 'give_payment' === get_post_type( $id_or_currency_code ) ) {
|
38 |
+
$donation_meta = give_get_meta( $id_or_currency_code, '_give_payment_meta', true );
|
39 |
+
|
40 |
+
if (
|
41 |
+
! empty( $donation_meta['currency'] ) &&
|
42 |
+
$give_options['currency'] !== $donation_meta['currency']
|
43 |
+
) {
|
44 |
+
$setting = $currencies[ $donation_meta['currency'] ]['setting'];
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
if ( empty( $setting ) ) {
|
50 |
+
// Set thousand separator.
|
51 |
+
$thousand_separator = isset( $give_options['thousands_separator'] ) ? $give_options['thousands_separator'] : ',';
|
52 |
+
$thousand_separator = empty( $thousand_separator ) ? ' ' : $thousand_separator;
|
53 |
+
|
54 |
+
// Set decimal separator.
|
55 |
+
$default_decimal_separators = array(
|
56 |
+
'.' => ',',
|
57 |
+
',' => '.',
|
58 |
+
);
|
59 |
+
|
60 |
+
$default_decimal_separator = in_array( $thousand_separator, $default_decimal_separators ) ?
|
61 |
+
$default_decimal_separators[ $thousand_separator ] :
|
62 |
+
'.';
|
63 |
+
|
64 |
+
$decimal_separator = ! empty( $give_options['decimal_separator'] ) ? $give_options['decimal_separator'] : $default_decimal_separator;
|
65 |
+
|
66 |
+
$setting = array(
|
67 |
+
'currency_position' => give_get_option( 'currency_position', 'before' ),
|
68 |
+
'thousands_separator' => $thousand_separator,
|
69 |
+
'decimal_separator' => $decimal_separator,
|
70 |
+
'number_decimals' => give_get_option( 'number_decimals', 0 ),
|
71 |
+
);
|
72 |
+
}
|
73 |
+
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Filter the currency formatting setting.
|
77 |
+
*
|
78 |
+
* @since 1.8.15
|
79 |
+
*/
|
80 |
+
return apply_filters( 'give_get_currency_formatting_settings', $setting, $id_or_currency_code );
|
81 |
+
}
|
82 |
|
83 |
/**
|
84 |
* Get decimal count
|
85 |
*
|
86 |
* @since 1.6
|
87 |
*
|
88 |
+
* @param int|string $id_or_currency_code
|
89 |
+
*
|
90 |
* @return mixed
|
91 |
*/
|
92 |
+
function give_get_price_decimals( $id_or_currency_code = null ) {
|
93 |
+
// Set currency on basis of donation id.
|
94 |
+
if( empty( $id_or_currency_code ) ){
|
95 |
+
$id_or_currency_code = give_get_currency();
|
96 |
+
}
|
97 |
+
|
98 |
+
$number_of_decimals = 0;
|
99 |
+
|
100 |
+
if( ! give_is_zero_based_currency( $id_or_currency_code ) ){
|
101 |
+
$setting = give_get_currency_formatting_settings( $id_or_currency_code );
|
102 |
+
$number_of_decimals = $setting['number_decimals'];
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Filter the number of decimals
|
107 |
+
*
|
108 |
+
* @since 1.6
|
109 |
+
*/
|
110 |
+
return apply_filters( 'give_sanitize_amount_decimals', $number_of_decimals, $id_or_currency_code );
|
111 |
}
|
112 |
|
113 |
/**
|
114 |
* Get thousand separator
|
115 |
*
|
116 |
+
* @param int|string $id_or_currency_code
|
117 |
+
*
|
118 |
* @since 1.6
|
119 |
*
|
120 |
* @return mixed
|
121 |
*/
|
122 |
+
function give_get_price_thousand_separator( $id_or_currency_code = null ) {
|
123 |
+
$setting = give_get_currency_formatting_settings( $id_or_currency_code );
|
|
|
|
|
124 |
|
125 |
+
/**
|
126 |
+
* Filter the thousand separator
|
127 |
+
*
|
128 |
+
* @since 1.6
|
129 |
+
*/
|
130 |
+
return apply_filters( 'give_get_price_thousand_separator', $setting['thousands_separator'], $id_or_currency_code );
|
131 |
}
|
132 |
|
133 |
/**
|
134 |
* Get decimal separator
|
135 |
*
|
136 |
+
* @param string $id_or_currency_code
|
137 |
+
*
|
138 |
* @since 1.6
|
139 |
*
|
140 |
* @return mixed
|
141 |
*/
|
142 |
+
function give_get_price_decimal_separator( $id_or_currency_code = null ) {
|
143 |
+
$setting = give_get_currency_formatting_settings( $id_or_currency_code );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
+
/**
|
146 |
+
* Filter the thousand separator
|
147 |
+
*
|
148 |
+
* @since 1.6
|
149 |
+
*/
|
150 |
+
return apply_filters( 'give_get_price_decimal_separator', $setting['decimal_separator'], $id_or_currency_code );
|
151 |
}
|
152 |
|
153 |
|
322 |
*
|
323 |
* @since 1.0
|
324 |
*
|
325 |
+
* @param string $amount Price amount to format
|
326 |
+
* @param array $args Array of arguments.
|
327 |
*
|
328 |
* @return string $amount Newly formatted amount or Price Not Available
|
329 |
*/
|
334 |
}
|
335 |
|
336 |
$default_args = array(
|
337 |
+
'decimal' => true,
|
338 |
+
'sanitize' => true,
|
339 |
+
'donation_id' => 0,
|
340 |
+
'currency' => '',
|
341 |
);
|
342 |
|
343 |
$args = wp_parse_args( $args, $default_args );
|
344 |
|
345 |
+
// Set Currency based on donation id, if required.
|
346 |
+
if( $args['donation_id'] && empty( $args['currency'] ) ) {
|
347 |
+
$donation_meta = give_get_meta( $args['donation_id'], '_give_payment_meta', true );
|
348 |
+
$args['currency'] = $donation_meta['currency'];
|
349 |
+
}
|
350 |
+
|
351 |
$formatted = 0;
|
352 |
+
$currency = ! empty( $args['currency'] ) ? $args['currency'] : give_get_currency( $args['donation_id'] );
|
353 |
+
$thousands_sep = give_get_price_thousand_separator( $currency );
|
354 |
+
$decimal_sep = give_get_price_decimal_separator( $currency );
|
355 |
+
$decimals = ! empty( $args['decimal'] ) ? give_get_price_decimals( $currency ) : 0;
|
356 |
|
357 |
if ( ! empty( $amount ) ) {
|
358 |
// Sanitize amount before formatting.
|
399 |
}
|
400 |
}
|
401 |
|
402 |
+
/**
|
403 |
+
* Filter the formatted amount
|
404 |
+
*
|
405 |
+
* @since 1.0
|
406 |
+
*/
|
407 |
return apply_filters( 'give_format_amount', $formatted, $amount, $decimals, $decimal_sep, $thousands_sep, $currency, $args );
|
408 |
}
|
409 |
|
423 |
* @return float|string formatted amount number with large number names.
|
424 |
*/
|
425 |
function give_human_format_large_amount( $amount, $args = array() ) {
|
426 |
+
// Bailout.
|
427 |
+
if( empty( $amount ) ) {
|
428 |
+
return '';
|
429 |
+
};
|
430 |
|
431 |
+
// Set default currency;
|
432 |
+
if( empty( $args['currency'] )) {
|
433 |
+
$args['currency'] = give_get_currency();
|
434 |
+
}
|
435 |
|
436 |
// Get thousand separator.
|
437 |
$thousands_sep = give_get_price_thousand_separator();
|
585 |
return $formatted;
|
586 |
}
|
587 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
588 |
|
589 |
/**
|
590 |
* Get date format string on basis of given context.
|
includes/forms/template.php
CHANGED
@@ -389,7 +389,7 @@ function give_output_donation_amount_top( $form_id = 0, $args = array() ) {
|
|
389 |
$variable_pricing = give_has_variable_prices( $form_id );
|
390 |
$allow_custom_amount = give_get_meta( $form_id, '_give_custom_amount', true );
|
391 |
$currency_position = isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before';
|
392 |
-
$symbol = give_currency_symbol( give_get_currency() );
|
393 |
$currency_output = '<span class="give-currency-symbol give-currency-position-' . $currency_position . '">' . $symbol . '</span>';
|
394 |
$default_amount = give_format_amount( give_get_default_form_amount( $form_id ), array( 'sanitize' => false ) );
|
395 |
$custom_amount_text = give_get_meta( $form_id, '_give_custom_amount_text', true );
|
@@ -1592,7 +1592,7 @@ function give_checkout_final_total( $form_id ) {
|
|
1592 |
</span>
|
1593 |
<span class="give-final-total-amount"
|
1594 |
data-total="<?php echo give_format_amount( $total, array( 'sanitize' => false ) ); ?>">
|
1595 |
-
<?php echo give_currency_filter( give_format_amount( $total, array( 'sanitize' => false ) ) ); ?>
|
1596 |
</span>
|
1597 |
</p>
|
1598 |
<?php
|
389 |
$variable_pricing = give_has_variable_prices( $form_id );
|
390 |
$allow_custom_amount = give_get_meta( $form_id, '_give_custom_amount', true );
|
391 |
$currency_position = isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before';
|
392 |
+
$symbol = give_currency_symbol( give_get_currency( $form_id, $args ) );
|
393 |
$currency_output = '<span class="give-currency-symbol give-currency-position-' . $currency_position . '">' . $symbol . '</span>';
|
394 |
$default_amount = give_format_amount( give_get_default_form_amount( $form_id ), array( 'sanitize' => false ) );
|
395 |
$custom_amount_text = give_get_meta( $form_id, '_give_custom_amount_text', true );
|
1592 |
</span>
|
1593 |
<span class="give-final-total-amount"
|
1594 |
data-total="<?php echo give_format_amount( $total, array( 'sanitize' => false ) ); ?>">
|
1595 |
+
<?php echo give_currency_filter( give_format_amount( $total, array( 'sanitize' => false ) ), give_get_currency( $form_id ) ); ?>
|
1596 |
</span>
|
1597 |
</p>
|
1598 |
<?php
|
includes/gateways/manual.php
CHANGED
@@ -47,7 +47,7 @@ function give_manual_payment( $purchase_data ) {
|
|
47 |
'date' => $purchase_data['date'],
|
48 |
'user_email' => $purchase_data['user_email'],
|
49 |
'purchase_key' => $purchase_data['purchase_key'],
|
50 |
-
'currency' => give_get_currency(),
|
51 |
'user_info' => $purchase_data['user_info'],
|
52 |
'status' => 'pending'
|
53 |
);
|
47 |
'date' => $purchase_data['date'],
|
48 |
'user_email' => $purchase_data['user_email'],
|
49 |
'purchase_key' => $purchase_data['purchase_key'],
|
50 |
+
'currency' => give_get_currency( $purchase_data['post_data']['give-form-id'], $purchase_data ),
|
51 |
'user_info' => $purchase_data['user_info'],
|
52 |
'status' => 'pending'
|
53 |
);
|
includes/gateways/offline-donations.php
CHANGED
@@ -116,7 +116,7 @@ function give_offline_process_payment( $purchase_data ) {
|
|
116 |
'date' => $purchase_data['date'],
|
117 |
'user_email' => $purchase_data['user_email'],
|
118 |
'purchase_key' => $purchase_data['purchase_key'],
|
119 |
-
'currency' => give_get_currency(),
|
120 |
'user_info' => $purchase_data['user_info'],
|
121 |
'status' => 'pending',
|
122 |
'gateway' => 'offline'
|
116 |
'date' => $purchase_data['date'],
|
117 |
'user_email' => $purchase_data['user_email'],
|
118 |
'purchase_key' => $purchase_data['purchase_key'],
|
119 |
+
'currency' => give_get_currency( $purchase_data['post_data']['give-form-id'], $purchase_data ),
|
120 |
'user_info' => $purchase_data['user_info'],
|
121 |
'status' => 'pending',
|
122 |
'gateway' => 'offline'
|
includes/gateways/paypal-standard.php
CHANGED
@@ -612,7 +612,7 @@ function give_build_paypal_url( $payment_id, $payment_data ) {
|
|
612 |
'no_shipping' => '1',
|
613 |
'shipping' => '0',
|
614 |
'no_note' => '1',
|
615 |
-
'currency_code' => give_get_currency(),
|
616 |
'charset' => get_bloginfo( 'charset' ),
|
617 |
'custom' => $payment_id,
|
618 |
'rm' => '2',
|
612 |
'no_shipping' => '1',
|
613 |
'shipping' => '0',
|
614 |
'no_note' => '1',
|
615 |
+
'currency_code' => give_get_currency( $payment_id, $payment_data ),
|
616 |
'charset' => get_bloginfo( 'charset' ),
|
617 |
'custom' => $payment_id,
|
618 |
'rm' => '2',
|
includes/import-functions.php
CHANGED
@@ -345,7 +345,7 @@ function give_import_get_user_from_csv( $data, $import_setting = array() ) {
|
|
345 |
*/
|
346 |
function give_import_default_options() {
|
347 |
/**
|
348 |
-
* Filter to modify
|
349 |
*
|
350 |
* @since 1.8.13
|
351 |
*
|
@@ -379,8 +379,16 @@ function give_import_donations_options() {
|
|
379 |
'line2' => __( 'Address 2', 'give' ),
|
380 |
'city' => __( 'City', 'give' ),
|
381 |
'state' => __( 'State', 'give' ),
|
382 |
-
'country' =>
|
383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
'email' => __( 'Donor Email', 'give' ),
|
385 |
'post_status' => __( 'Donation Status', 'give' ),
|
386 |
'gateway' => __( 'Payment Method', 'give' ),
|
@@ -423,7 +431,7 @@ function give_import_donation_form_options() {
|
|
423 |
* @return array
|
424 |
*/
|
425 |
return (array) apply_filters( 'give_import_donation_form_options', array(
|
426 |
-
'form_title' => __( 'Donation Form', 'give' ),
|
427 |
'form_id' => __( 'Donation Form ID', 'give' ),
|
428 |
'form_level' => __( 'Donation Level', 'give' ),
|
429 |
'form_custom_amount_text' => __( 'Custom Amount Text', 'give' ),
|
345 |
*/
|
346 |
function give_import_default_options() {
|
347 |
/**
|
348 |
+
* Filter to modify default option in the import dropdown
|
349 |
*
|
350 |
* @since 1.8.13
|
351 |
*
|
379 |
'line2' => __( 'Address 2', 'give' ),
|
380 |
'city' => __( 'City', 'give' ),
|
381 |
'state' => __( 'State', 'give' ),
|
382 |
+
'country' => array(
|
383 |
+
__( 'Country', 'give' ),
|
384 |
+
__( 'County', 'give' ),
|
385 |
+
__( 'Region', 'give' ),
|
386 |
+
__( 'Province', 'give' ),
|
387 |
+
),
|
388 |
+
'zip' => array(
|
389 |
+
__( 'Zip', 'give' ),
|
390 |
+
__( 'Postal Code', 'give' ),
|
391 |
+
),
|
392 |
'email' => __( 'Donor Email', 'give' ),
|
393 |
'post_status' => __( 'Donation Status', 'give' ),
|
394 |
'gateway' => __( 'Payment Method', 'give' ),
|
431 |
* @return array
|
432 |
*/
|
433 |
return (array) apply_filters( 'give_import_donation_form_options', array(
|
434 |
+
'form_title' => __( 'Donation Form Title', 'give' ),
|
435 |
'form_id' => __( 'Donation Form ID', 'give' ),
|
436 |
'form_level' => __( 'Donation Level', 'give' ),
|
437 |
'form_custom_amount_text' => __( 'Custom Amount Text', 'give' ),
|
includes/misc-functions.php
CHANGED
@@ -33,13 +33,34 @@ function give_is_test_mode() {
|
|
33 |
* Get the set currency
|
34 |
*
|
35 |
* @since 1.0
|
|
|
|
|
|
|
|
|
|
|
36 |
* @return string The currency code
|
37 |
*/
|
38 |
-
function give_get_currency() {
|
39 |
|
40 |
-
|
|
|
|
|
41 |
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
/**
|
@@ -61,44 +82,351 @@ function give_get_currency_position() {
|
|
61 |
* Get Currencies
|
62 |
*
|
63 |
* @since 1.0
|
|
|
|
|
|
|
64 |
* @return array $currencies A list of the available currencies
|
65 |
*/
|
66 |
-
|
67 |
-
function give_get_currencies() {
|
68 |
$currencies = array(
|
69 |
-
'USD' =>
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
'
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
'
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
);
|
100 |
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
103 |
|
104 |
|
@@ -112,36 +440,7 @@ function give_get_currencies() {
|
|
112 |
* @return array
|
113 |
*/
|
114 |
function give_currency_symbols( $decode_currencies = false ) {
|
115 |
-
$currencies =
|
116 |
-
'GBP' => '£',
|
117 |
-
'BRL' => 'R$',
|
118 |
-
'EUR' => '€',
|
119 |
-
'NOK' => 'kr.',
|
120 |
-
'INR' => '₹',
|
121 |
-
'USD' => '$',
|
122 |
-
'AUD' => '$',
|
123 |
-
'CAD' => '$',
|
124 |
-
'HKD' => '$',
|
125 |
-
'MXN' => '$',
|
126 |
-
'SGD' => '$',
|
127 |
-
'JPY' => '¥',
|
128 |
-
'THB' => '฿',
|
129 |
-
'TRY' => '₺',
|
130 |
-
'TWD' => 'NT$',
|
131 |
-
'ILS' => '₪',
|
132 |
-
'RIAL' => '﷼',
|
133 |
-
'RUB' => '₽',
|
134 |
-
'DKK' => ' kr. ',
|
135 |
-
'SEK' => ' kr. ',
|
136 |
-
'PLN' => 'zł',
|
137 |
-
'PHP' => '₱',
|
138 |
-
'MYR' => 'RM',
|
139 |
-
'HUF' => 'Ft',
|
140 |
-
'CZK' => 'Kč',
|
141 |
-
'KRW' => '₩',
|
142 |
-
'ZAR' => 'R',
|
143 |
-
'MAD' => '.د.م',
|
144 |
-
);
|
145 |
|
146 |
if ( $decode_currencies ) {
|
147 |
$currencies = array_map( 'html_entity_decode', $currencies );
|
@@ -1240,8 +1539,8 @@ function give_get_meta( $id, $meta_key, $single = false, $default = false ) {
|
|
1240 |
*
|
1241 |
* @param int $id
|
1242 |
* @param string $meta_key
|
1243 |
-
* @param
|
1244 |
-
* @param
|
1245 |
*
|
1246 |
* @return mixed
|
1247 |
*/
|
@@ -1639,10 +1938,14 @@ function give_recount_form_income_donation( $form_id = false ) {
|
|
1639 |
* Zero Decimal based Currency.
|
1640 |
*
|
1641 |
* @since 1.8.14
|
|
|
|
|
|
|
|
|
1642 |
*
|
1643 |
* @return bool
|
1644 |
*/
|
1645 |
-
function give_is_zero_based_currency() {
|
1646 |
$zero_based_currency = array(
|
1647 |
'PYG', // Paraguayan Guarani.
|
1648 |
'GNF', // Guinean Franc.
|
@@ -1661,8 +1964,13 @@ function give_is_zero_based_currency() {
|
|
1661 |
'XOF', // West African Cfa Franc.
|
1662 |
);
|
1663 |
|
|
|
|
|
|
|
|
|
|
|
1664 |
// Check for Zero Based Currency.
|
1665 |
-
if ( in_array(
|
1666 |
return true;
|
1667 |
}
|
1668 |
|
33 |
* Get the set currency
|
34 |
*
|
35 |
* @since 1.0
|
36 |
+
* @since 1.8.15 Upgrade function to handle dynamic currency
|
37 |
+
*
|
38 |
+
* @param int $donation_or_form_id Donation or Form ID
|
39 |
+
* @param array|object $args Additional data
|
40 |
+
*
|
41 |
* @return string The currency code
|
42 |
*/
|
43 |
+
function give_get_currency( $donation_or_form_id = null, $args = array() ) {
|
44 |
|
45 |
+
// Get currency from donation
|
46 |
+
if ( is_numeric( $donation_or_form_id ) && 'give_payment' === get_post_type( $donation_or_form_id ) ) {
|
47 |
+
$donation_meta = give_get_meta( $donation_or_form_id, '_give_payment_meta', true );
|
48 |
|
49 |
+
if ( ! empty( $donation_meta['currency'] ) ) {
|
50 |
+
$currency = $donation_meta['currency'];
|
51 |
+
} else {
|
52 |
+
$currency = give_get_option( 'currency', 'USD' );
|
53 |
+
}
|
54 |
+
} else {
|
55 |
+
$currency = give_get_option( 'currency', 'USD' );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Filter the currency on basis of donation or form id or addtional data.
|
60 |
+
*
|
61 |
+
* @since 1.0
|
62 |
+
*/
|
63 |
+
return apply_filters( 'give_currency', $currency, $donation_or_form_id, $args );
|
64 |
}
|
65 |
|
66 |
/**
|
82 |
* Get Currencies
|
83 |
*
|
84 |
* @since 1.0
|
85 |
+
*
|
86 |
+
* @param string $info Specify currency info
|
87 |
+
*
|
88 |
* @return array $currencies A list of the available currencies
|
89 |
*/
|
90 |
+
function give_get_currencies( $info = 'admin_label' ) {
|
|
|
91 |
$currencies = array(
|
92 |
+
'USD' => array(
|
93 |
+
'admin_label' => __( 'US Dollars ($)', 'give' ),
|
94 |
+
'symbol' => '$',
|
95 |
+
'setting' => array(
|
96 |
+
'currency_position' => 'before',
|
97 |
+
'thousands_separator' => ',',
|
98 |
+
'decimal_separator' => '.',
|
99 |
+
'number_decimals' => 2,
|
100 |
+
),
|
101 |
+
),
|
102 |
+
'EUR' => array(
|
103 |
+
'admin_label' => __( 'Euros (€)', 'give' ),
|
104 |
+
'symbol' => '€',
|
105 |
+
'setting' => array(
|
106 |
+
'currency_position' => 'before',
|
107 |
+
'thousands_separator' => '.',
|
108 |
+
'decimal_separator' => ',',
|
109 |
+
'number_decimals' => 2,
|
110 |
+
),
|
111 |
+
),
|
112 |
+
'GBP' => array(
|
113 |
+
'admin_label' => __( 'Pounds Sterling (£)', 'give' ),
|
114 |
+
'symbol' => '£',
|
115 |
+
'setting' => array(
|
116 |
+
'currency_position' => 'before',
|
117 |
+
'thousands_separator' => ',',
|
118 |
+
'decimal_separator' => '.',
|
119 |
+
'number_decimals' => 2,
|
120 |
+
),
|
121 |
+
),
|
122 |
+
'AUD' => array(
|
123 |
+
'admin_label' => __( 'Australian Dollars ($)', 'give' ),
|
124 |
+
'symbol' => '$',
|
125 |
+
'setting' => array(
|
126 |
+
'currency_position' => 'before',
|
127 |
+
'thousands_separator' => ',',
|
128 |
+
'decimal_separator' => '.',
|
129 |
+
'number_decimals' => 2,
|
130 |
+
),
|
131 |
+
),
|
132 |
+
'BRL' => array(
|
133 |
+
'admin_label' => __( 'Brazilian Real (R$)', 'give' ),
|
134 |
+
'symbol' => 'R$',
|
135 |
+
'setting' => array(
|
136 |
+
'currency_position' => 'before',
|
137 |
+
'thousands_separator' => ',',
|
138 |
+
'decimal_separator' => '.',
|
139 |
+
'number_decimals' => 2,
|
140 |
+
),
|
141 |
+
),
|
142 |
+
'CAD' => array(
|
143 |
+
'admin_label' => __( 'Canadian Dollars ($)', 'give' ),
|
144 |
+
'symbol' => '$',
|
145 |
+
'setting' => array(
|
146 |
+
'currency_position' => 'before',
|
147 |
+
'thousands_separator' => ',',
|
148 |
+
'decimal_separator' => '.',
|
149 |
+
'number_decimals' => 2,
|
150 |
+
),
|
151 |
+
),
|
152 |
+
'CZK' => array(
|
153 |
+
'admin_label' => __( 'Czech Koruna (Kč)', 'give' ),
|
154 |
+
'symbol' => 'Kč',
|
155 |
+
'setting' => array(
|
156 |
+
'currency_position' => 'before',
|
157 |
+
'thousands_separator' => ',',
|
158 |
+
'decimal_separator' => '.',
|
159 |
+
'number_decimals' => 2,
|
160 |
+
),
|
161 |
+
),
|
162 |
+
'DKK' => array(
|
163 |
+
'admin_label' => __( 'Danish Krone (kr.)', 'give' ),
|
164 |
+
'symbol' => ' kr. ',
|
165 |
+
'setting' => array(
|
166 |
+
'currency_position' => 'before',
|
167 |
+
'thousands_separator' => ',',
|
168 |
+
'decimal_separator' => '.',
|
169 |
+
'number_decimals' => 2,
|
170 |
+
),
|
171 |
+
),
|
172 |
+
'HKD' => array(
|
173 |
+
'admin_label' => __( 'Hong Kong Dollar ($)', 'give' ),
|
174 |
+
'symbol' => '$',
|
175 |
+
'setting' => array(
|
176 |
+
'currency_position' => 'before',
|
177 |
+
'thousands_separator' => ',',
|
178 |
+
'decimal_separator' => '.',
|
179 |
+
'number_decimals' => 2,
|
180 |
+
),
|
181 |
+
),
|
182 |
+
'HUF' => array(
|
183 |
+
'admin_label' => __( 'Hungarian Forint (Ft)', 'give' ),
|
184 |
+
'symbol' => 'Ft',
|
185 |
+
'setting' => array(
|
186 |
+
'currency_position' => 'before',
|
187 |
+
'thousands_separator' => ',',
|
188 |
+
'decimal_separator' => '.',
|
189 |
+
'number_decimals' => 2,
|
190 |
+
),
|
191 |
+
),
|
192 |
+
'ILS' => array(
|
193 |
+
'admin_label' => __( 'Israeli Shekel (₪)', 'give' ),
|
194 |
+
'symbol' => '₪',
|
195 |
+
'setting' => array(
|
196 |
+
'currency_position' => 'before',
|
197 |
+
'thousands_separator' => ',',
|
198 |
+
'decimal_separator' => '.',
|
199 |
+
'number_decimals' => 2,
|
200 |
+
),
|
201 |
+
),
|
202 |
+
'JPY' => array(
|
203 |
+
'admin_label' => __( 'Japanese Yen (¥)', 'give' ),
|
204 |
+
'symbol' => '¥',
|
205 |
+
'setting' => array(
|
206 |
+
'currency_position' => 'before',
|
207 |
+
'thousands_separator' => ',',
|
208 |
+
'decimal_separator' => '.',
|
209 |
+
'number_decimals' => 0,
|
210 |
+
),
|
211 |
+
),
|
212 |
+
'MYR' => array(
|
213 |
+
'admin_label' => __( 'Malaysian Ringgits (RM)', 'give' ),
|
214 |
+
'symbol' => 'RM',
|
215 |
+
'setting' => array(
|
216 |
+
'currency_position' => 'before',
|
217 |
+
'thousands_separator' => ',',
|
218 |
+
'decimal_separator' => '.',
|
219 |
+
'number_decimals' => 2,
|
220 |
+
),
|
221 |
+
),
|
222 |
+
'MXN' => array(
|
223 |
+
'admin_label' => __( 'Mexican Peso ($)', 'give' ),
|
224 |
+
'symbol' => '$',
|
225 |
+
'setting' => array(
|
226 |
+
'currency_position' => 'before',
|
227 |
+
'thousands_separator' => ',',
|
228 |
+
'decimal_separator' => '.',
|
229 |
+
'number_decimals' => 2,
|
230 |
+
),
|
231 |
+
),
|
232 |
+
'MAD' => array(
|
233 |
+
'admin_label' => __( 'Moroccan Dirham (.د.م)', 'give' ),
|
234 |
+
'symbol' => '.د.م',
|
235 |
+
'setting' => array(
|
236 |
+
'currency_position' => 'before',
|
237 |
+
'thousands_separator' => ',',
|
238 |
+
'decimal_separator' => '.',
|
239 |
+
'number_decimals' => 2,
|
240 |
+
),
|
241 |
+
),
|
242 |
+
'NZD' => array(
|
243 |
+
'admin_label' => __( 'New Zealand Dollar ($)', 'give' ),
|
244 |
+
'symbol' => '$',
|
245 |
+
'setting' => array(
|
246 |
+
'currency_position' => 'before',
|
247 |
+
'thousands_separator' => ',',
|
248 |
+
'decimal_separator' => '.',
|
249 |
+
'number_decimals' => 2,
|
250 |
+
),
|
251 |
+
),
|
252 |
+
'NOK' => array(
|
253 |
+
'admin_label' => __( 'Norwegian Krone (Kr.)', 'give' ),
|
254 |
+
'symbol' => 'kr.',
|
255 |
+
'setting' => array(
|
256 |
+
'currency_position' => 'before',
|
257 |
+
'thousands_separator' => '.',
|
258 |
+
'decimal_separator' => ',',
|
259 |
+
'number_decimals' => 2,
|
260 |
+
),
|
261 |
+
),
|
262 |
+
'PHP' => array(
|
263 |
+
'admin_label' => __( 'Philippine Pesos (₱)', 'give' ),
|
264 |
+
'symbol' => '₱',
|
265 |
+
'setting' => array(
|
266 |
+
'currency_position' => 'before',
|
267 |
+
'thousands_separator' => ',',
|
268 |
+
'decimal_separator' => '.',
|
269 |
+
'number_decimals' => 2,
|
270 |
+
),
|
271 |
+
),
|
272 |
+
'PLN' => array(
|
273 |
+
'admin_label' => __( 'Polish Zloty (zł)', 'give' ),
|
274 |
+
'symbol' => 'zł',
|
275 |
+
'setting' => array(
|
276 |
+
'currency_position' => 'before',
|
277 |
+
'thousands_separator' => ' ',
|
278 |
+
'decimal_separator' => ',',
|
279 |
+
'number_decimals' => 2,
|
280 |
+
),
|
281 |
+
),
|
282 |
+
'SGD' => array(
|
283 |
+
'admin_label' => __( 'Singapore Dollar ($)', 'give' ),
|
284 |
+
'symbol' => '$',
|
285 |
+
'setting' => array(
|
286 |
+
'currency_position' => 'before',
|
287 |
+
'thousands_separator' => ',',
|
288 |
+
'decimal_separator' => '.',
|
289 |
+
'number_decimals' => 2,
|
290 |
+
),
|
291 |
+
),
|
292 |
+
'KRW' => array(
|
293 |
+
'admin_label' => __( 'South Korean Won (₩)', 'give' ),
|
294 |
+
'symbol' => '₩',
|
295 |
+
'setting' => array(
|
296 |
+
'currency_position' => 'before',
|
297 |
+
'thousands_separator' => ',',
|
298 |
+
'decimal_separator' => '.',
|
299 |
+
'number_decimals' => 0,
|
300 |
+
),
|
301 |
+
),
|
302 |
+
'ZAR' => array(
|
303 |
+
'admin_label' => __( 'South African Rand (R)', 'give' ),
|
304 |
+
'symbol' => 'R',
|
305 |
+
'setting' => array(
|
306 |
+
'currency_position' => 'before',
|
307 |
+
'thousands_separator' => ' ',
|
308 |
+
'decimal_separator' => '.',
|
309 |
+
'number_decimals' => 2,
|
310 |
+
),
|
311 |
+
),
|
312 |
+
'SEK' => array(
|
313 |
+
'admin_label' => __( 'Swedish Krona (kr)', 'give' ),
|
314 |
+
'symbol' => ' kr. ',
|
315 |
+
'setting' => array(
|
316 |
+
'currency_position' => 'before',
|
317 |
+
'thousands_separator' => ' ',
|
318 |
+
'decimal_separator' => ',',
|
319 |
+
'number_decimals' => 2,
|
320 |
+
),
|
321 |
+
),
|
322 |
+
'CHF' => array(
|
323 |
+
'admin_label' => __( 'Swiss Franc (CHF)', 'give' ),
|
324 |
+
'symbol' => 'CHF',
|
325 |
+
'setting' => array(
|
326 |
+
'currency_position' => 'before',
|
327 |
+
'thousands_separator' => ',',
|
328 |
+
'decimal_separator' => '.',
|
329 |
+
'number_decimals' => 2,
|
330 |
+
),
|
331 |
+
),
|
332 |
+
'TWD' => array(
|
333 |
+
'admin_label' => __( 'Taiwan New Dollars (NT$)', 'give' ),
|
334 |
+
'symbol' => 'NT$',
|
335 |
+
'setting' => array(
|
336 |
+
'currency_position' => 'before',
|
337 |
+
'thousands_separator' => '\'',
|
338 |
+
'decimal_separator' => '.',
|
339 |
+
'number_decimals' => 2,
|
340 |
+
),
|
341 |
+
),
|
342 |
+
'THB' => array(
|
343 |
+
'admin_label' => __( 'Thai Baht (฿)', 'give' ),
|
344 |
+
'symbol' => '฿',
|
345 |
+
'setting' => array(
|
346 |
+
'currency_position' => 'before',
|
347 |
+
'thousands_separator' => ',',
|
348 |
+
'decimal_separator' => '.',
|
349 |
+
'number_decimals' => 2,
|
350 |
+
),
|
351 |
+
),
|
352 |
+
'INR' => array(
|
353 |
+
'admin_label' => __( 'Indian Rupee (₹)', 'give' ),
|
354 |
+
'symbol' => '₹',
|
355 |
+
'setting' => array(
|
356 |
+
'currency_position' => 'before',
|
357 |
+
'thousands_separator' => ',',
|
358 |
+
'decimal_separator' => '.',
|
359 |
+
'number_decimals' => 2,
|
360 |
+
),
|
361 |
+
),
|
362 |
+
'TRY' => array(
|
363 |
+
'admin_label' => __( 'Turkish Lira (₺)', 'give' ),
|
364 |
+
'symbol' => '₺',
|
365 |
+
'setting' => array(
|
366 |
+
'currency_position' => 'before',
|
367 |
+
'thousands_separator' => ',',
|
368 |
+
'decimal_separator' => '.',
|
369 |
+
'number_decimals' => 2,
|
370 |
+
),
|
371 |
+
),
|
372 |
+
'RIAL' => array(
|
373 |
+
'admin_label' => __( 'Iranian Rial (﷼)', 'give' ),
|
374 |
+
'symbol' => '﷼',
|
375 |
+
'setting' => array(
|
376 |
+
'currency_position' => 'after',
|
377 |
+
'thousands_separator' => ',',
|
378 |
+
'decimal_separator' => '.',
|
379 |
+
'number_decimals' => 2,
|
380 |
+
),
|
381 |
+
),
|
382 |
+
'RUB' => array(
|
383 |
+
'admin_label' => __( 'Russian Rubles (руб)', 'give' ),
|
384 |
+
'symbol' => '₽',
|
385 |
+
'setting' => array(
|
386 |
+
'currency_position' => 'before',
|
387 |
+
'thousands_separator' => '.',
|
388 |
+
'decimal_separator' => ',',
|
389 |
+
'number_decimals' => 2,
|
390 |
+
),
|
391 |
+
),
|
392 |
);
|
393 |
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Filter the currencies
|
397 |
+
* Note: you can register new currency by using this filter
|
398 |
+
* array(
|
399 |
+
* 'admin_label' => '', // required
|
400 |
+
* 'symbol' => '', // required
|
401 |
+
* 'setting' => '' // required
|
402 |
+
* ....
|
403 |
+
* )
|
404 |
+
*
|
405 |
+
* @since 1.8.15
|
406 |
+
*
|
407 |
+
* @param array $currencies
|
408 |
+
*/
|
409 |
+
$currencies = apply_filters( 'give_currencies', $currencies );
|
410 |
+
|
411 |
+
// Backward compatibility: handle old way of currency registration.
|
412 |
+
// Backward compatibility: Return desired result.
|
413 |
+
if ( ! empty( $currencies ) ) {
|
414 |
+
foreach ( $currencies as $currency_code => $currency_setting ) {
|
415 |
+
if ( is_string( $currency_setting ) ) {
|
416 |
+
$currencies[ $currency_code ] = array(
|
417 |
+
'admin_label' => $currency_setting,
|
418 |
+
'symbol' => '',
|
419 |
+
'setting' => array(),
|
420 |
+
);
|
421 |
+
}
|
422 |
+
}
|
423 |
+
|
424 |
+
if ( ! empty( $info ) && is_string( $info ) && 'all' !== $info ) {
|
425 |
+
$currencies = wp_list_pluck( $currencies, $info );
|
426 |
+
}
|
427 |
+
}
|
428 |
+
|
429 |
+
return $currencies;
|
430 |
}
|
431 |
|
432 |
|
440 |
* @return array
|
441 |
*/
|
442 |
function give_currency_symbols( $decode_currencies = false ) {
|
443 |
+
$currencies = give_get_currencies('symbol' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
|
445 |
if ( $decode_currencies ) {
|
446 |
$currencies = array_map( 'html_entity_decode', $currencies );
|
1539 |
*
|
1540 |
* @param int $id
|
1541 |
* @param string $meta_key
|
1542 |
+
* @param mixed $meta_value
|
1543 |
+
* @param mixed $prev_value
|
1544 |
*
|
1545 |
* @return mixed
|
1546 |
*/
|
1938 |
* Zero Decimal based Currency.
|
1939 |
*
|
1940 |
* @since 1.8.14
|
1941 |
+
* @see https://github.com/WordImpress/Give/issues/2191
|
1942 |
+
*
|
1943 |
+
*
|
1944 |
+
* @param string $currency Currency code
|
1945 |
*
|
1946 |
* @return bool
|
1947 |
*/
|
1948 |
+
function give_is_zero_based_currency( $currency = '' ) {
|
1949 |
$zero_based_currency = array(
|
1950 |
'PYG', // Paraguayan Guarani.
|
1951 |
'GNF', // Guinean Franc.
|
1964 |
'XOF', // West African Cfa Franc.
|
1965 |
);
|
1966 |
|
1967 |
+
// Set default currency.
|
1968 |
+
if( empty( $currency ) ) {
|
1969 |
+
$currency = give_get_currency();
|
1970 |
+
}
|
1971 |
+
|
1972 |
// Check for Zero Based Currency.
|
1973 |
+
if ( in_array( $currency, $zero_based_currency ) ) {
|
1974 |
return true;
|
1975 |
}
|
1976 |
|
includes/payments/class-give-payment.php
CHANGED
@@ -627,23 +627,23 @@ final class Give_Payment {
|
|
627 |
}
|
628 |
|
629 |
$payment_data = array(
|
630 |
-
'price'
|
631 |
-
'date'
|
632 |
-
'user_email'
|
633 |
-
'purchase_key'
|
634 |
-
'form_title'
|
635 |
-
'form_id'
|
636 |
-
'donor_id'
|
637 |
-
'price_id'
|
638 |
-
'currency'
|
639 |
-
'user_info'
|
640 |
'id' => $this->user_id,
|
641 |
'email' => $this->email,
|
642 |
'first_name' => $this->first_name,
|
643 |
'last_name' => $this->last_name,
|
644 |
'address' => $this->address,
|
645 |
),
|
646 |
-
'status'
|
647 |
);
|
648 |
|
649 |
$args = apply_filters( 'give_insert_payment_args', array(
|
@@ -940,11 +940,11 @@ final class Give_Payment {
|
|
940 |
$this->update_meta( '_give_payment_total', give_sanitize_amount_for_db( $this->total ) );
|
941 |
|
942 |
$new_meta = array(
|
943 |
-
'form_title'
|
944 |
-
'form_id'
|
945 |
-
'price_id'
|
946 |
-
'currency'
|
947 |
-
'user_info'
|
948 |
);
|
949 |
|
950 |
$meta = $this->get_meta();
|
@@ -1030,7 +1030,7 @@ final class Give_Payment {
|
|
1030 |
|
1031 |
// Sanitizing the price here so we don't have a dozen calls later.
|
1032 |
$donation_amount = give_maybe_sanitize_amount( $donation_amount );
|
1033 |
-
$total = round( $donation_amount,
|
1034 |
|
1035 |
// Add Options.
|
1036 |
$default_options = array();
|
@@ -1047,8 +1047,8 @@ final class Give_Payment {
|
|
1047 |
$donation = array(
|
1048 |
'name' => $donation->post_title,
|
1049 |
'id' => $donation->ID,
|
1050 |
-
'price' => round( $total,
|
1051 |
-
'subtotal' => round( $total,
|
1052 |
'price_id' => $args['price_id'],
|
1053 |
'action' => 'add',
|
1054 |
'options' => $options,
|
@@ -1675,7 +1675,7 @@ final class Give_Payment {
|
|
1675 |
}
|
1676 |
}
|
1677 |
|
1678 |
-
return round(
|
1679 |
}
|
1680 |
|
1681 |
/**
|
@@ -1701,7 +1701,7 @@ final class Give_Payment {
|
|
1701 |
* @return string The currency for the payment
|
1702 |
*/
|
1703 |
private function setup_currency() {
|
1704 |
-
$currency =
|
1705 |
|
1706 |
return $currency;
|
1707 |
}
|
627 |
}
|
628 |
|
629 |
$payment_data = array(
|
630 |
+
'price' => $this->total,
|
631 |
+
'date' => $this->date,
|
632 |
+
'user_email' => $this->email,
|
633 |
+
'purchase_key' => $this->key,
|
634 |
+
'form_title' => $this->form_title,
|
635 |
+
'form_id' => $this->form_id,
|
636 |
+
'donor_id' => $this->donor_id,
|
637 |
+
'price_id' => $this->price_id,
|
638 |
+
'currency' => $this->currency,
|
639 |
+
'user_info' => array(
|
640 |
'id' => $this->user_id,
|
641 |
'email' => $this->email,
|
642 |
'first_name' => $this->first_name,
|
643 |
'last_name' => $this->last_name,
|
644 |
'address' => $this->address,
|
645 |
),
|
646 |
+
'status' => $this->status,
|
647 |
);
|
648 |
|
649 |
$args = apply_filters( 'give_insert_payment_args', array(
|
940 |
$this->update_meta( '_give_payment_total', give_sanitize_amount_for_db( $this->total ) );
|
941 |
|
942 |
$new_meta = array(
|
943 |
+
'form_title' => $this->form_title,
|
944 |
+
'form_id' => $this->form_id,
|
945 |
+
'price_id' => $this->price_id,
|
946 |
+
'currency' => $this->currency,
|
947 |
+
'user_info' => $this->user_info,
|
948 |
);
|
949 |
|
950 |
$meta = $this->get_meta();
|
1030 |
|
1031 |
// Sanitizing the price here so we don't have a dozen calls later.
|
1032 |
$donation_amount = give_maybe_sanitize_amount( $donation_amount );
|
1033 |
+
$total = round( $donation_amount, give_get_price_decimals( $this->ID ) );
|
1034 |
|
1035 |
// Add Options.
|
1036 |
$default_options = array();
|
1047 |
$donation = array(
|
1048 |
'name' => $donation->post_title,
|
1049 |
'id' => $donation->ID,
|
1050 |
+
'price' => round( $total, give_get_price_decimals( $this->ID ) ),
|
1051 |
+
'subtotal' => round( $total, give_get_price_decimals( $this->ID ) ),
|
1052 |
'price_id' => $args['price_id'],
|
1053 |
'action' => 'add',
|
1054 |
'options' => $options,
|
1675 |
}
|
1676 |
}
|
1677 |
|
1678 |
+
return round( (float) $amount, give_get_price_decimals( $this->ID ) );
|
1679 |
}
|
1680 |
|
1681 |
/**
|
1701 |
* @return string The currency for the payment
|
1702 |
*/
|
1703 |
private function setup_currency() {
|
1704 |
+
$currency = ! empty( $this->payment_meta['currency'] ) ? $this->payment_meta['currency'] : apply_filters( 'give_payment_currency_default', give_get_currency( $this->form_id, $this ), $this );
|
1705 |
|
1706 |
return $currency;
|
1707 |
}
|
includes/payments/class-payment-stats.php
CHANGED
@@ -153,7 +153,7 @@ class Give_Payment_Stats extends Give_Stats {
|
|
153 |
}
|
154 |
|
155 |
//return earnings
|
156 |
-
return round( $earnings,
|
157 |
|
158 |
}
|
159 |
|
153 |
}
|
154 |
|
155 |
//return earnings
|
156 |
+
return round( $earnings, give_get_price_decimals( $form_id ) );
|
157 |
|
158 |
}
|
159 |
|
includes/payments/functions.php
CHANGED
@@ -138,6 +138,15 @@ function give_insert_payment( $payment_data = array() ) {
|
|
138 |
return false;
|
139 |
}
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
$payment = new Give_Payment();
|
142 |
$gateway = ! empty( $payment_data['gateway'] ) ? $payment_data['gateway'] : '';
|
143 |
$gateway = empty( $gateway ) && isset( $_POST['give-gateway'] ) ? $_POST['give-gateway'] : $gateway;
|
@@ -148,7 +157,7 @@ function give_insert_payment( $payment_data = array() ) {
|
|
148 |
// Set properties.
|
149 |
$payment->total = $payment_data['price'];
|
150 |
$payment->status = ! empty( $payment_data['status'] ) ? $payment_data['status'] : 'pending';
|
151 |
-
$payment->currency = ! empty( $payment_data['currency'] ) ? $payment_data['currency'] : give_get_currency();
|
152 |
$payment->user_info = $payment_data['user_info'];
|
153 |
$payment->gateway = $gateway;
|
154 |
$payment->form_title = $form_title;
|
@@ -230,7 +239,7 @@ function give_create_payment( $payment_data ) {
|
|
230 |
'date' => $payment_data['date'],
|
231 |
'user_email' => $payment_data['user_email'],
|
232 |
'purchase_key' => $payment_data['purchase_key'],
|
233 |
-
'currency' => give_get_currency(),
|
234 |
'user_info' => $payment_data['user_info'],
|
235 |
'status' => 'pending',
|
236 |
'gateway' => 'paypal',
|
@@ -905,7 +914,7 @@ function give_get_total_earnings( $recalculate = false ) {
|
|
905 |
$total = 0; // Don't ever show negative earnings.
|
906 |
}
|
907 |
|
908 |
-
return apply_filters( 'give_total_earnings', round( $total,
|
909 |
}
|
910 |
|
911 |
/**
|
138 |
return false;
|
139 |
}
|
140 |
|
141 |
+
/**
|
142 |
+
* Fire the filter on donation data before insert.
|
143 |
+
*
|
144 |
+
* @since 1.8.15
|
145 |
+
*
|
146 |
+
* @param array $payment_data Arguments passed.
|
147 |
+
*/
|
148 |
+
$payment_data = apply_filters( 'give_pre_insert_payment', $payment_data );
|
149 |
+
|
150 |
$payment = new Give_Payment();
|
151 |
$gateway = ! empty( $payment_data['gateway'] ) ? $payment_data['gateway'] : '';
|
152 |
$gateway = empty( $gateway ) && isset( $_POST['give-gateway'] ) ? $_POST['give-gateway'] : $gateway;
|
157 |
// Set properties.
|
158 |
$payment->total = $payment_data['price'];
|
159 |
$payment->status = ! empty( $payment_data['status'] ) ? $payment_data['status'] : 'pending';
|
160 |
+
$payment->currency = ! empty( $payment_data['currency'] ) ? $payment_data['currency'] : give_get_currency( $payment_data['give_form_id'], $payment_data );
|
161 |
$payment->user_info = $payment_data['user_info'];
|
162 |
$payment->gateway = $gateway;
|
163 |
$payment->form_title = $form_title;
|
239 |
'date' => $payment_data['date'],
|
240 |
'user_email' => $payment_data['user_email'],
|
241 |
'purchase_key' => $payment_data['purchase_key'],
|
242 |
+
'currency' => give_get_currency( $form_id, $payment_data ),
|
243 |
'user_info' => $payment_data['user_info'],
|
244 |
'status' => 'pending',
|
245 |
'gateway' => 'paypal',
|
914 |
$total = 0; // Don't ever show negative earnings.
|
915 |
}
|
916 |
|
917 |
+
return apply_filters( 'give_total_earnings', round( $total, give_get_price_decimals() ), $total );
|
918 |
}
|
919 |
|
920 |
/**
|
includes/process-donation.php
CHANGED
@@ -32,7 +32,7 @@ function give_process_donation_form() {
|
|
32 |
*/
|
33 |
do_action( 'give_pre_process_donation' );
|
34 |
|
35 |
-
// Validate the form $_POST data
|
36 |
$valid_data = give_donation_form_validate_fields();
|
37 |
|
38 |
/**
|
@@ -49,12 +49,12 @@ function give_process_donation_form() {
|
|
49 |
|
50 |
$is_ajax = isset( $_POST['give_ajax'] );
|
51 |
|
52 |
-
// Process the login form
|
53 |
if ( isset( $_POST['give_login_submit'] ) ) {
|
54 |
give_process_form_login();
|
55 |
}
|
56 |
|
57 |
-
// Validate the user
|
58 |
$user = give_get_donation_form_user( $valid_data );
|
59 |
|
60 |
if ( false === $valid_data || give_get_errors() || ! $user ) {
|
@@ -71,16 +71,16 @@ function give_process_donation_form() {
|
|
71 |
}
|
72 |
}
|
73 |
|
74 |
-
// If AJAX send back success to proceed with form submission
|
75 |
if ( $is_ajax ) {
|
76 |
echo 'success';
|
77 |
give_die();
|
78 |
}
|
79 |
|
80 |
-
// After AJAX: Setup session if not using php_sessions
|
81 |
if ( ! Give()->session->use_php_sessions() ) {
|
82 |
-
// Double-check that set_cookie is publicly accessible
|
83 |
-
// we're using a slightly modified class-wp-sessions.php
|
84 |
$session_reflection = new ReflectionMethod( 'WP_Session', 'set_cookie' );
|
85 |
if ( $session_reflection->isPublic() ) {
|
86 |
// Manually set the cookie.
|
@@ -88,7 +88,7 @@ function give_process_donation_form() {
|
|
88 |
}
|
89 |
}
|
90 |
|
91 |
-
// Setup user information
|
92 |
$user_info = array(
|
93 |
'id' => $user['user_id'],
|
94 |
'email' => $user['user_email'],
|
@@ -104,19 +104,19 @@ function give_process_donation_form() {
|
|
104 |
'0.00';
|
105 |
$purchase_key = strtolower( md5( $user['user_email'] . date( 'Y-m-d H:i:s' ) . $auth_key . uniqid( 'give', true ) ) );
|
106 |
|
107 |
-
// Setup donation information
|
108 |
$donation_data = array(
|
109 |
-
'price'
|
110 |
-
'purchase_key'
|
111 |
-
'user_email'
|
112 |
-
'date'
|
113 |
-
'user_info'
|
114 |
-
'post_data'
|
115 |
-
'gateway'
|
116 |
-
'card_info'
|
117 |
);
|
118 |
|
119 |
-
// Add the user data for hooks
|
120 |
$valid_data['user'] = $user;
|
121 |
|
122 |
/**
|
@@ -130,11 +130,11 @@ function give_process_donation_form() {
|
|
130 |
* @param array $user_info Array containing basic user information.
|
131 |
* @param bool|array $valid_data Validate fields.
|
132 |
*/
|
133 |
-
do_action( 'give_checkout_before_gateway', $_POST, $user_info, $valid_data );
|
134 |
|
135 |
-
// Sanity check for price
|
136 |
if ( ! $donation_data['price'] ) {
|
137 |
-
// Revert to manual
|
138 |
$donation_data['gateway'] = 'manual';
|
139 |
$_POST['give-gateway'] = 'manual';
|
140 |
}
|
@@ -146,17 +146,17 @@ function give_process_donation_form() {
|
|
146 |
*/
|
147 |
$donation_data = apply_filters( 'give_donation_data_before_gateway', $donation_data, $valid_data );
|
148 |
|
149 |
-
// Setup the data we're storing in the donation session
|
150 |
$session_data = $donation_data;
|
151 |
|
152 |
-
// Make sure credit card numbers are never stored in sessions
|
153 |
unset( $session_data['card_info']['card_number'] );
|
154 |
unset( $session_data['post_data']['card_number'] );
|
155 |
|
156 |
// Used for showing data to non logged-in users after donation, and for other plugins needing donation data.
|
157 |
give_set_purchase_session( $session_data );
|
158 |
|
159 |
-
// Send info to the gateway for payment processing
|
160 |
give_send_to_gateway( $donation_data['gateway'], $donation_data );
|
161 |
give_die();
|
162 |
|
@@ -185,7 +185,7 @@ function give_check_logged_in_user_for_existing_email( $valid_data, $post ) {
|
|
185 |
$submitted_email = $valid_data['logged_in_user']['user_email'];
|
186 |
$donor = new Give_Donor( get_current_user_id(), true );
|
187 |
|
188 |
-
// If this email address is not registered with this customer, see if it belongs to any other customer
|
189 |
if (
|
190 |
$submitted_email !== $donor->email
|
191 |
&& ( is_array( $donor->emails ) && ! in_array( $submitted_email, $donor->emails ) )
|
@@ -262,26 +262,26 @@ add_action( 'wp_ajax_nopriv_give_process_donation_login', 'give_process_form_log
|
|
262 |
*/
|
263 |
function give_donation_form_validate_fields() {
|
264 |
|
265 |
-
// Check if there is $_POST
|
266 |
if ( empty( $_POST ) ) {
|
267 |
return false;
|
268 |
}
|
269 |
|
270 |
$form_id = ! empty( $_POST['give-form-id'] ) ? $_POST['give-form-id'] : '';
|
271 |
|
272 |
-
// Start an array to collect valid data
|
273 |
$valid_data = array(
|
274 |
-
'gateway' => give_donation_form_validate_gateway(), // Gateway fallback (amount is validated here)
|
275 |
-
'need_new_user' => false, // New user flag
|
276 |
-
'need_user_login' => false, // Login user flag
|
277 |
-
'logged_user_data' => array(), // Logged user collected data
|
278 |
-
'new_user_data' => array(), // New user collected data
|
279 |
-
'login_user_data' => array(), // Login user collected data
|
280 |
-
'guest_user_data' => array(), // Guest user collected data
|
281 |
-
'cc_info' => give_donation_form_validate_cc(),// Credit card info
|
282 |
);
|
283 |
|
284 |
-
// Validate Honeypot First
|
285 |
if ( ! empty( $_POST['give-honeypot'] ) ) {
|
286 |
give_set_error( 'invalid_honeypot', esc_html__( 'Honeypot field detected. Go away bad bot!', 'give' ) );
|
287 |
}
|
@@ -294,7 +294,7 @@ function give_donation_form_validate_fields() {
|
|
294 |
give_set_error( 'invalid_donation', __( 'This donation has been flagged as spam. Please try again.', 'give' ) );
|
295 |
}
|
296 |
|
297 |
-
// Validate agree to terms
|
298 |
if ( give_is_terms_enabled( $form_id ) ) {
|
299 |
give_donation_form_validate_agree_to_terms();
|
300 |
}
|
32 |
*/
|
33 |
do_action( 'give_pre_process_donation' );
|
34 |
|
35 |
+
// Validate the form $_POST data.
|
36 |
$valid_data = give_donation_form_validate_fields();
|
37 |
|
38 |
/**
|
49 |
|
50 |
$is_ajax = isset( $_POST['give_ajax'] );
|
51 |
|
52 |
+
// Process the login form.
|
53 |
if ( isset( $_POST['give_login_submit'] ) ) {
|
54 |
give_process_form_login();
|
55 |
}
|
56 |
|
57 |
+
// Validate the user.
|
58 |
$user = give_get_donation_form_user( $valid_data );
|
59 |
|
60 |
if ( false === $valid_data || give_get_errors() || ! $user ) {
|
71 |
}
|
72 |
}
|
73 |
|
74 |
+
// If AJAX send back success to proceed with form submission.
|
75 |
if ( $is_ajax ) {
|
76 |
echo 'success';
|
77 |
give_die();
|
78 |
}
|
79 |
|
80 |
+
// After AJAX: Setup session if not using php_sessions.
|
81 |
if ( ! Give()->session->use_php_sessions() ) {
|
82 |
+
// Double-check that set_cookie is publicly accessible.
|
83 |
+
// we're using a slightly modified class-wp-sessions.php.
|
84 |
$session_reflection = new ReflectionMethod( 'WP_Session', 'set_cookie' );
|
85 |
if ( $session_reflection->isPublic() ) {
|
86 |
// Manually set the cookie.
|
88 |
}
|
89 |
}
|
90 |
|
91 |
+
// Setup user information.
|
92 |
$user_info = array(
|
93 |
'id' => $user['user_id'],
|
94 |
'email' => $user['user_email'],
|
104 |
'0.00';
|
105 |
$purchase_key = strtolower( md5( $user['user_email'] . date( 'Y-m-d H:i:s' ) . $auth_key . uniqid( 'give', true ) ) );
|
106 |
|
107 |
+
// Setup donation information.
|
108 |
$donation_data = array(
|
109 |
+
'price' => $price,
|
110 |
+
'purchase_key' => $purchase_key,
|
111 |
+
'user_email' => $user['user_email'],
|
112 |
+
'date' => date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ),
|
113 |
+
'user_info' => stripslashes_deep( $user_info ),
|
114 |
+
'post_data' => give_clean( $_POST ),
|
115 |
+
'gateway' => $valid_data['gateway'],
|
116 |
+
'card_info' => $valid_data['cc_info'],
|
117 |
);
|
118 |
|
119 |
+
// Add the user data for hooks.
|
120 |
$valid_data['user'] = $user;
|
121 |
|
122 |
/**
|
130 |
* @param array $user_info Array containing basic user information.
|
131 |
* @param bool|array $valid_data Validate fields.
|
132 |
*/
|
133 |
+
do_action( 'give_checkout_before_gateway', give_clean( $_POST ), $user_info, $valid_data );
|
134 |
|
135 |
+
// Sanity check for price.
|
136 |
if ( ! $donation_data['price'] ) {
|
137 |
+
// Revert to manual.
|
138 |
$donation_data['gateway'] = 'manual';
|
139 |
$_POST['give-gateway'] = 'manual';
|
140 |
}
|
146 |
*/
|
147 |
$donation_data = apply_filters( 'give_donation_data_before_gateway', $donation_data, $valid_data );
|
148 |
|
149 |
+
// Setup the data we're storing in the donation session.
|
150 |
$session_data = $donation_data;
|
151 |
|
152 |
+
// Make sure credit card numbers are never stored in sessions.
|
153 |
unset( $session_data['card_info']['card_number'] );
|
154 |
unset( $session_data['post_data']['card_number'] );
|
155 |
|
156 |
// Used for showing data to non logged-in users after donation, and for other plugins needing donation data.
|
157 |
give_set_purchase_session( $session_data );
|
158 |
|
159 |
+
// Send info to the gateway for payment processing.
|
160 |
give_send_to_gateway( $donation_data['gateway'], $donation_data );
|
161 |
give_die();
|
162 |
|
185 |
$submitted_email = $valid_data['logged_in_user']['user_email'];
|
186 |
$donor = new Give_Donor( get_current_user_id(), true );
|
187 |
|
188 |
+
// If this email address is not registered with this customer, see if it belongs to any other customer.
|
189 |
if (
|
190 |
$submitted_email !== $donor->email
|
191 |
&& ( is_array( $donor->emails ) && ! in_array( $submitted_email, $donor->emails ) )
|
262 |
*/
|
263 |
function give_donation_form_validate_fields() {
|
264 |
|
265 |
+
// Check if there is $_POST.
|
266 |
if ( empty( $_POST ) ) {
|
267 |
return false;
|
268 |
}
|
269 |
|
270 |
$form_id = ! empty( $_POST['give-form-id'] ) ? $_POST['give-form-id'] : '';
|
271 |
|
272 |
+
// Start an array to collect valid data.
|
273 |
$valid_data = array(
|
274 |
+
'gateway' => give_donation_form_validate_gateway(), // Gateway fallback (amount is validated here).
|
275 |
+
'need_new_user' => false, // New user flag.
|
276 |
+
'need_user_login' => false, // Login user flag.
|
277 |
+
'logged_user_data' => array(), // Logged user collected data.
|
278 |
+
'new_user_data' => array(), // New user collected data.
|
279 |
+
'login_user_data' => array(), // Login user collected data.
|
280 |
+
'guest_user_data' => array(), // Guest user collected data.
|
281 |
+
'cc_info' => give_donation_form_validate_cc(),// Credit card info.
|
282 |
);
|
283 |
|
284 |
+
// Validate Honeypot First.
|
285 |
if ( ! empty( $_POST['give-honeypot'] ) ) {
|
286 |
give_set_error( 'invalid_honeypot', esc_html__( 'Honeypot field detected. Go away bad bot!', 'give' ) );
|
287 |
}
|
294 |
give_set_error( 'invalid_donation', __( 'This donation has been flagged as spam. Please try again.', 'give' ) );
|
295 |
}
|
296 |
|
297 |
+
// Validate agree to terms.
|
298 |
if ( give_is_terms_enabled( $form_id ) ) {
|
299 |
give_donation_form_validate_agree_to_terms();
|
300 |
}
|
includes/scripts.php
CHANGED
@@ -318,7 +318,7 @@ function give_load_admin_scripts( $hook ) {
|
|
318 |
'one_or_more_option' => __( 'Choose one or more forms', 'give' ),
|
319 |
'currency_sign' => give_currency_filter( '' ),
|
320 |
'currency_pos' => isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before',
|
321 |
-
'currency_decimals' =>
|
322 |
'batch_export_no_class' => __( 'You must choose a method.', 'give' ),
|
323 |
'batch_export_no_reqs' => __( 'Required fields not completed.', 'give' ),
|
324 |
'reset_stats_warn' => __( 'Are you sure you want to reset Give? This process is <strong><em>not reversible</em></strong> and will delete all data regardless of test or live mode. Please be sure you have a recent backup before proceeding.', 'give' ),
|
318 |
'one_or_more_option' => __( 'Choose one or more forms', 'give' ),
|
319 |
'currency_sign' => give_currency_filter( '' ),
|
320 |
'currency_pos' => isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before',
|
321 |
+
'currency_decimals' => give_get_price_decimals(),
|
322 |
'batch_export_no_class' => __( 'You must choose a method.', 'give' ),
|
323 |
'batch_export_no_reqs' => __( 'Required fields not completed.', 'give' ),
|
324 |
'reset_stats_warn' => __( 'Are you sure you want to reset Give? This process is <strong><em>not reversible</em></strong> and will delete all data regardless of test or live mode. Please be sure you have a recent backup before proceeding.', 'give' ),
|
includes/shortcodes.php
CHANGED
@@ -23,7 +23,22 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
23 |
*
|
24 |
* @return string
|
25 |
*/
|
26 |
-
function give_donation_history() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
// If payment_key query arg exists, return receipt instead of donation history.
|
29 |
if ( isset( $_GET['payment_key'] ) ) {
|
23 |
*
|
24 |
* @return string
|
25 |
*/
|
26 |
+
function give_donation_history( $atts ) {
|
27 |
+
|
28 |
+
$donation_history_args = shortcode_atts( array(
|
29 |
+
'id' => true,
|
30 |
+
'date' => true,
|
31 |
+
'donor' => false,
|
32 |
+
'amount' => true,
|
33 |
+
'status' => false,
|
34 |
+
'payment_method' => false,
|
35 |
+
), $atts, 'donation_history' );
|
36 |
+
|
37 |
+
// Always show receipt link.
|
38 |
+
$donation_history_args['details'] = true;
|
39 |
+
|
40 |
+
// Set Donation History Shortcode Arguments in session variable.
|
41 |
+
Give()->session->set( 'give_donation_history_args', $donation_history_args );
|
42 |
|
43 |
// If payment_key query arg exists, return receipt instead of donation history.
|
44 |
if ( isset( $_GET['payment_key'] ) ) {
|
languages/give.pot
CHANGED
@@ -48,7 +48,7 @@ msgstr ""
|
|
48 |
msgid "If you cannot upgrade your PHP version yourself, you can send an email to your host. If they don't want to upgrade your PHP version, we would suggest you switch hosts. Have a look at one of the recommended %1$sWordPress hosting partners%2$s."
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: includes/actions.php:
|
52 |
msgid "WordPress user #%d is connected to #%d"
|
53 |
msgstr ""
|
54 |
|
@@ -64,7 +64,7 @@ msgstr ""
|
|
64 |
msgid "You do not have permission to install plugin updates"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: includes/admin/EDD_SL_Plugin_Updater.php:396, includes/admin/donors/donor-actions.php:31, includes/admin/donors/donor-actions.php:45, includes/admin/donors/donor-actions.php:151, includes/admin/donors/donor-actions.php:165, includes/admin/donors/donor-actions.php:233, includes/admin/donors/donor-actions.php:248, includes/admin/donors/donor-actions.php:332, includes/admin/donors/donor-actions.php:346, includes/admin/donors/donor-actions.php:435, includes/admin/donors/donor-actions.php:530, includes/admin/donors/donor-actions.php:576, includes/admin/forms/dashboard-columns.php:244, includes/admin/payments/actions.php:31, includes/admin/payments/actions.php:89, includes/admin/payments/actions.php:100, includes/admin/payments/actions.php:342, includes/admin/payments/actions.php:362, includes/admin/payments/actions.php:395, includes/admin/payments/actions.php:417, includes/admin/payments/view-payment-details.php:24, includes/admin/payments/view-payment-details.php:34, includes/admin/tools/data/class-give-tools-delete-import-donors.php:257, includes/admin/tools/data/class-give-tools-delete-test-donors.php:228, includes/admin/tools/data/class-give-tools-delete-test-transactions.php:172, includes/admin/tools/data/class-give-tools-recount-all-stats.php:235, includes/admin/tools/data/class-give-tools-recount-donor-stats.php:195, includes/admin/tools/data/class-give-tools-recount-form-stats.php:180, includes/admin/tools/data/class-give-tools-recount-income.php:156, includes/admin/tools/data/class-give-tools-recount-single-donor-stats.php:151, includes/admin/tools/data/class-give-tools-reset-stats.php:187, includes/admin/tools/export/class-batch-export.php:145, includes/admin/tools/export/class-export.php:177, includes/admin/tools/export/export-actions.php:26, includes/admin/tools/export/pdf-reports.php:31, includes/admin/tools/export/pdf-reports.php:35, includes/admin/tools/logs/class-api-requests-logs-list-table.php:141, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:128, includes/admin/upgrades/upgrade-functions.php:168, includes/admin/upgrades/upgrade-functions.php:206, includes/api/class-give-api.php:1791, includes/api/class-give-api.php:1797, includes/api/class-give-api.php:1812, includes/api/class-give-api.php:1817, includes/class-give-license-handler.php:
|
68 |
msgid "Error"
|
69 |
msgstr ""
|
70 |
|
@@ -208,7 +208,7 @@ msgstr ""
|
|
208 |
msgid "Thanks :)"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: includes/admin/admin-pages.php:39, includes/admin/admin-pages.php:39, includes/admin/donors/class-donor-table.php:66, includes/admin/reports/class-donor-reports-table.php:67
|
212 |
msgid "Donors"
|
213 |
msgstr ""
|
214 |
|
@@ -504,7 +504,7 @@ msgstr ""
|
|
504 |
msgid "Gateways Settings"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: includes/admin/class-give-settings.php:315, includes/admin/settings/class-settings-gateways.php:181, includes/admin/tools/views/html-admin-page-system-info.php:438, includes/import-functions.php:
|
508 |
msgid "Test Mode"
|
509 |
msgstr ""
|
510 |
|
@@ -1055,7 +1055,7 @@ msgid_plural "%s Give Forms"
|
|
1055 |
msgstr[0] ""
|
1056 |
msgstr[1] ""
|
1057 |
|
1058 |
-
#: includes/admin/donors/class-donor-table.php:65, includes/admin/reports/class-donor-reports-table.php:66, includes/admin/tools/logs/class-sales-logs-list-table.php:115, templates/shortcode-receipt.php:38
|
1059 |
msgid "Donor"
|
1060 |
msgstr ""
|
1061 |
|
@@ -1071,7 +1071,7 @@ msgstr ""
|
|
1071 |
msgid "Email"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
-
#: includes/admin/donors/class-donor-table.php:169, includes/admin/forms/dashboard-columns.php:40, includes/admin/reports/class-donor-reports-table.php:217, includes/admin/reports/class-form-reports-table.php:121, includes/admin/reports/graphing.php:181, includes/admin/reports/graphing.php:427, includes/admin/tools/class-settings-logs.php:120, includes/admin/tools/export/class-batch-export-forms.php:56, includes/admin/tools/export/class-export-earnings.php:65, includes/admin/tools/export/pdf-reports.php:
|
1075 |
msgid "Donations"
|
1076 |
msgstr ""
|
1077 |
|
@@ -1095,7 +1095,7 @@ msgstr ""
|
|
1095 |
msgid "Notes for \"%s\""
|
1096 |
msgstr ""
|
1097 |
|
1098 |
-
#: includes/admin/donors/class-donor-table.php:213, includes/admin/donors/donors.php:686, includes/import-functions.php:
|
1099 |
msgid "Notes"
|
1100 |
msgstr ""
|
1101 |
|
@@ -1103,7 +1103,7 @@ msgstr ""
|
|
1103 |
msgid "Delete \"%s\""
|
1104 |
msgstr ""
|
1105 |
|
1106 |
-
#: includes/admin/donors/class-donor-table.php:215, includes/admin/payments/class-payments-table.php:508, includes/admin/payments/class-payments-table.php:612, includes/payments/functions.php:
|
1107 |
msgid "Delete"
|
1108 |
msgstr ""
|
1109 |
|
@@ -1159,7 +1159,7 @@ msgstr ""
|
|
1159 |
msgid "An error has occurred. Please try again."
|
1160 |
msgstr ""
|
1161 |
|
1162 |
-
#: includes/admin/donors/donor-actions.php:453, includes/admin/tools/export/export-actions.php:26, includes/admin/tools/export/pdf-reports.php:35, includes/api/class-give-api.php:1791, includes/class-give-license-handler.php:
|
1163 |
msgid "Nonce verification failed."
|
1164 |
msgstr ""
|
1165 |
|
@@ -1179,7 +1179,7 @@ msgstr ""
|
|
1179 |
msgid "Email successfully added to donor."
|
1180 |
msgstr ""
|
1181 |
|
1182 |
-
#: includes/admin/donors/donor-actions.php:486, includes/admin/donors/donor-actions.php:539, includes/admin/donors/donor-actions.php:586, includes/payments/functions.php:
|
1183 |
msgid "System"
|
1184 |
msgstr ""
|
1185 |
|
@@ -1333,19 +1333,19 @@ msgstr ""
|
|
1333 |
msgid "Recent Donations"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
-
#: includes/admin/donors/donors.php:544, includes/admin/forms/class-metabox-form-data.php:207, includes/admin/tools/export/class-batch-export-forms.php:44, includes/admin/tools/export/class-batch-export-payments.php:42, includes/admin/tools/export/class-export.php:72, templates/history-donations.php:
|
1337 |
msgid "ID"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
-
#: includes/admin/donors/donors.php:545, includes/admin/forms/class-metabox-form-data.php:212, includes/admin/forms/class-metabox-form-data.php:384, includes/admin/forms/dashboard-columns.php:38, includes/admin/payments/class-payments-table.php:353, includes/admin/tools/export/class-batch-export-payments.php:55, templates/history-donations.php:
|
1341 |
msgid "Amount"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
-
#: includes/admin/donors/donors.php:546, includes/admin/forms/dashboard-columns.php:43, includes/admin/payments/class-payments-table.php:352, includes/admin/tools/export/class-batch-export-payments.php:59, includes/admin/tools/export/class-export-earnings.php:64, includes/admin/tools/export/class-export.php:73, includes/admin/tools/logs/class-api-requests-logs-list-table.php:96, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:131, includes/admin/tools/logs/class-sales-logs-list-table.php:120, templates/history-donations.php:
|
1345 |
msgid "Date"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
-
#: includes/admin/donors/donors.php:547, includes/admin/payments/class-payments-table.php:351, includes/admin/tools/export/class-batch-export-forms.php:51, includes/admin/tools/export/class-batch-export-payments.php:61, includes/admin/tools/logs/class-sales-logs-list-table.php:118
|
1349 |
msgid "Status"
|
1350 |
msgstr ""
|
1351 |
|
@@ -1437,7 +1437,7 @@ msgstr ""
|
|
1437 |
msgid "Dropdown"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
-
#: includes/admin/forms/class-metabox-form-data.php:159, includes/misc-functions.php:
|
1441 |
msgid "Custom Amount"
|
1442 |
msgstr ""
|
1443 |
|
@@ -1445,11 +1445,11 @@ msgstr ""
|
|
1445 |
msgid "Do you want the user to be able to input their own donation amount?"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
-
#: includes/admin/forms/class-metabox-form-data.php:165, includes/admin/forms/class-metabox-form-data.php:301, includes/admin/forms/class-metabox-form-data.php:326, includes/admin/forms/class-metabox-form-data.php:359, includes/admin/forms/class-metabox-form-data.php:405, includes/admin/forms/class-metabox-form-data.php:445, includes/admin/settings/class-settings-advanced.php:83, includes/admin/settings/class-settings-advanced.php:105, includes/admin/settings/class-settings-display.php:62, includes/admin/settings/class-settings-display.php:74, includes/admin/settings/class-settings-display.php:86, includes/admin/settings/class-settings-display.php:117, includes/admin/settings/class-settings-display.php:128, includes/admin/settings/class-settings-display.php:139, includes/admin/settings/class-settings-display.php:150, includes/admin/settings/class-settings-display.php:169, includes/admin/settings/class-settings-display.php:200, includes/admin/settings/class-settings-display.php:211, includes/admin/settings/class-settings-display.php:242, includes/admin/settings/class-settings-email.php:149, includes/admin/settings/class-settings-gateways.php:85, includes/admin/settings/class-settings-gateways.php:96, includes/admin/settings/class-settings-gateways.php:128, includes/admin/settings/class-settings-gateways.php:187, includes/admin/settings/class-settings-general.php:74, includes/admin/tools/import/class-give-import-donations.php:
|
1449 |
msgid "Enabled"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
-
#: includes/admin/forms/class-metabox-form-data.php:166, includes/admin/forms/class-metabox-form-data.php:302, includes/admin/forms/class-metabox-form-data.php:327, includes/admin/forms/class-metabox-form-data.php:360, includes/admin/forms/class-metabox-form-data.php:406, includes/admin/forms/class-metabox-form-data.php:446, includes/admin/settings/class-settings-advanced.php:84, includes/admin/settings/class-settings-advanced.php:106, includes/admin/settings/class-settings-display.php:63, includes/admin/settings/class-settings-display.php:75, includes/admin/settings/class-settings-display.php:87, includes/admin/settings/class-settings-display.php:118, includes/admin/settings/class-settings-display.php:129, includes/admin/settings/class-settings-display.php:140, includes/admin/settings/class-settings-display.php:151, includes/admin/settings/class-settings-display.php:170, includes/admin/settings/class-settings-display.php:201, includes/admin/settings/class-settings-display.php:212, includes/admin/settings/class-settings-display.php:243, includes/admin/settings/class-settings-email.php:150, includes/admin/settings/class-settings-gateways.php:86, includes/admin/settings/class-settings-gateways.php:97, includes/admin/settings/class-settings-gateways.php:129, includes/admin/settings/class-settings-gateways.php:188, includes/admin/settings/class-settings-general.php:75, includes/admin/tools/import/class-give-import-donations.php:
|
1453 |
msgid "Disabled"
|
1454 |
msgstr ""
|
1455 |
|
@@ -1461,7 +1461,7 @@ msgstr ""
|
|
1461 |
msgid "Enter the minimum custom donation amount."
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: includes/admin/forms/class-metabox-form-data.php:183, includes/import-functions.php:
|
1465 |
msgid "Custom Amount Text"
|
1466 |
msgstr ""
|
1467 |
|
@@ -1477,7 +1477,7 @@ msgstr ""
|
|
1477 |
msgid "Add Level"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: includes/admin/forms/class-metabox-form-data.php:199, includes/admin/forms/class-metabox-form-data.php:226, includes/import-functions.php:
|
1481 |
msgid "Donation Level"
|
1482 |
msgstr ""
|
1483 |
|
@@ -1705,11 +1705,11 @@ msgstr ""
|
|
1705 |
msgid "This is the actual text which the user will have to agree to in order to make a donation."
|
1706 |
msgstr ""
|
1707 |
|
1708 |
-
#: includes/admin/forms/dashboard-columns.php:36, includes/admin/tools/export/class-batch-export-forms.php:52, includes/admin/tools/export/pdf-reports.php:
|
1709 |
msgid "Categories"
|
1710 |
msgstr ""
|
1711 |
|
1712 |
-
#: includes/admin/forms/dashboard-columns.php:37, includes/admin/tools/export/class-batch-export-forms.php:53, includes/admin/tools/export/pdf-reports.php:
|
1713 |
msgid "Tags"
|
1714 |
msgstr ""
|
1715 |
|
@@ -1717,7 +1717,7 @@ msgstr ""
|
|
1717 |
msgid "Goal"
|
1718 |
msgstr ""
|
1719 |
|
1720 |
-
#: includes/admin/forms/dashboard-columns.php:41, includes/admin/reports/class-earnings-report.php:46, includes/admin/reports/class-earnings-report.php:98, includes/admin/reports/class-form-reports-table.php:122, includes/admin/reports/graphing.php:180, includes/admin/reports/graphing.php:426, includes/admin/reports/reports.php:103, includes/admin/tools/export/class-batch-export-forms.php:57, includes/admin/tools/export/pdf-reports.php:
|
1721 |
msgid "Income"
|
1722 |
msgstr ""
|
1723 |
|
@@ -1797,31 +1797,31 @@ msgstr ""
|
|
1797 |
msgid "Completed"
|
1798 |
msgstr ""
|
1799 |
|
1800 |
-
#: includes/admin/payments/class-payments-table.php:277, includes/payments/functions.php:
|
1801 |
msgid "Pending"
|
1802 |
msgstr ""
|
1803 |
|
1804 |
-
#: includes/admin/payments/class-payments-table.php:281, includes/payments/functions.php:
|
1805 |
msgid "Processing"
|
1806 |
msgstr ""
|
1807 |
|
1808 |
-
#: includes/admin/payments/class-payments-table.php:285, includes/payments/functions.php:
|
1809 |
msgid "Refunded"
|
1810 |
msgstr ""
|
1811 |
|
1812 |
-
#: includes/admin/payments/class-payments-table.php:289, includes/payments/functions.php:
|
1813 |
msgid "Revoked"
|
1814 |
msgstr ""
|
1815 |
|
1816 |
-
#: includes/admin/payments/class-payments-table.php:293, includes/payments/functions.php:
|
1817 |
msgid "Failed"
|
1818 |
msgstr ""
|
1819 |
|
1820 |
-
#: includes/admin/payments/class-payments-table.php:297, includes/payments/functions.php:
|
1821 |
msgid "Cancelled"
|
1822 |
msgstr ""
|
1823 |
|
1824 |
-
#: includes/admin/payments/class-payments-table.php:301, includes/payments/functions.php:
|
1825 |
msgid "Abandoned"
|
1826 |
msgstr ""
|
1827 |
|
@@ -1829,11 +1829,11 @@ msgstr ""
|
|
1829 |
msgid "Preapproval Pending"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
-
#: includes/admin/payments/class-payments-table.php:350, includes/admin/shortcodes/shortcode-give-form.php:27, includes/admin/shortcodes/shortcode-give-form.php:28, includes/admin/tools/export/class-batch-export-donors.php:165, includes/admin/tools/views/html-admin-page-exports.php:231, includes/
|
1833 |
msgid "Donation Form"
|
1834 |
msgstr ""
|
1835 |
|
1836 |
-
#: includes/admin/payments/class-payments-table.php:354, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:132, templates/history-donations.php:
|
1837 |
msgid "Details"
|
1838 |
msgstr ""
|
1839 |
|
@@ -1885,7 +1885,7 @@ msgstr ""
|
|
1885 |
msgid "This donation was imported."
|
1886 |
msgstr ""
|
1887 |
|
1888 |
-
#: includes/admin/payments/class-payments-table.php:531, includes/admin/tools/class-settings-import.php:41, includes/admin/tools/class-settings-import.php:89, includes/admin/tools/import/class-give-import-donations.php:
|
1889 |
msgid "Import"
|
1890 |
msgstr ""
|
1891 |
|
@@ -2145,7 +2145,7 @@ msgstr ""
|
|
2145 |
msgid "Donation Forms Report"
|
2146 |
msgstr ""
|
2147 |
|
2148 |
-
#: includes/admin/reports/class-forms-report.php:46, includes/admin/reports/class-forms-report.php:93, includes/admin/reports/reports.php:104, includes/post-types.php:229
|
2149 |
msgid "Forms"
|
2150 |
msgstr ""
|
2151 |
|
@@ -2322,7 +2322,7 @@ msgid "Akismet SPAM Protection"
|
|
2322 |
msgstr ""
|
2323 |
|
2324 |
#: includes/admin/settings/class-settings-advanced.php:100
|
2325 |
-
msgid "Add a layer of SPAM protection to your donation submissions with Akismet. When enabled, donation submissions will be first sent to Akismet's API."
|
2326 |
msgstr ""
|
2327 |
|
2328 |
#: includes/admin/settings/class-settings-advanced.php:110
|
@@ -2625,7 +2625,7 @@ msgstr ""
|
|
2625 |
msgid "<a href=\"%s\">Create</a> a new Donation Form."
|
2626 |
msgstr ""
|
2627 |
|
2628 |
-
#: includes/admin/shortcodes/shortcode-give-form.php:53, includes/admin/shortcodes/shortcode-give-form.php:54, includes/admin/shortcodes/shortcode-give-goal.php:54, includes/admin/shortcodes/shortcode-give-goal.php:55
|
2629 |
msgid "Select a Donation Form"
|
2630 |
msgstr ""
|
2631 |
|
@@ -2633,7 +2633,7 @@ msgstr ""
|
|
2633 |
msgid "You must first select a Form!"
|
2634 |
msgstr ""
|
2635 |
|
2636 |
-
#: includes/admin/shortcodes/shortcode-give-form.php:57, includes/admin/shortcodes/shortcode-give-goal.php:58, includes/admin/tools/export/pdf-reports.php:
|
2637 |
msgid "No forms found."
|
2638 |
msgstr ""
|
2639 |
|
@@ -2849,15 +2849,15 @@ msgstr ""
|
|
2849 |
msgid "State"
|
2850 |
msgstr ""
|
2851 |
|
2852 |
-
#: includes/admin/tools/export/class-batch-export-donors.php:158, includes/import-functions.php:
|
2853 |
msgid "Zip"
|
2854 |
msgstr ""
|
2855 |
|
2856 |
-
#: includes/admin/tools/export/class-batch-export-donors.php:159, includes/admin/tools/export/class-batch-export-payments.php:51, includes/forms/template.php:933, includes/import-functions.php:
|
2857 |
msgid "Country"
|
2858 |
msgstr ""
|
2859 |
|
2860 |
-
#: includes/admin/tools/export/class-batch-export-donors.php:162, includes/admin/tools/views/html-admin-page-exports.php:224, includes/import-functions.php:
|
2861 |
msgid "User ID"
|
2862 |
msgstr ""
|
2863 |
|
@@ -2865,7 +2865,7 @@ msgstr ""
|
|
2865 |
msgid "First Donation Date"
|
2866 |
msgstr ""
|
2867 |
|
2868 |
-
#: includes/admin/tools/export/class-batch-export-donors.php:171, includes/admin/tools/export/pdf-reports.php:
|
2869 |
msgid "Number of Donations"
|
2870 |
msgstr ""
|
2871 |
|
@@ -2889,7 +2889,7 @@ msgstr ""
|
|
2889 |
msgid "Excerpt"
|
2890 |
msgstr ""
|
2891 |
|
2892 |
-
#: includes/admin/tools/export/class-batch-export-forms.php:54, includes/admin/tools/export/pdf-reports.php:
|
2893 |
msgid "Price"
|
2894 |
msgstr ""
|
2895 |
|
@@ -2901,11 +2901,11 @@ msgstr ""
|
|
2901 |
msgid "Payment Number"
|
2902 |
msgstr ""
|
2903 |
|
2904 |
-
#: includes/admin/tools/export/class-batch-export-payments.php:45, includes/forms/template.php:640, includes/forms/template.php:651, includes/misc-functions.php:
|
2905 |
msgid "First Name"
|
2906 |
msgstr ""
|
2907 |
|
2908 |
-
#: includes/admin/tools/export/class-batch-export-payments.php:46, includes/forms/template.php:660, includes/forms/template.php:673, includes/misc-functions.php:
|
2909 |
msgid "Last Name"
|
2910 |
msgstr ""
|
2911 |
|
@@ -2913,11 +2913,11 @@ msgstr ""
|
|
2913 |
msgid "Form ID"
|
2914 |
msgstr ""
|
2915 |
|
2916 |
-
#: includes/admin/tools/export/class-batch-export-payments.php:54, includes/admin/tools/export/pdf-reports.php:
|
2917 |
msgid "Form Name"
|
2918 |
msgstr ""
|
2919 |
|
2920 |
-
#: includes/admin/tools/export/class-batch-export-payments.php:56, includes/import-functions.php:
|
2921 |
msgid "Payment Method"
|
2922 |
msgstr ""
|
2923 |
|
@@ -2961,83 +2961,87 @@ msgstr ""
|
|
2961 |
msgid "You do not have permission to generate PDF sales reports."
|
2962 |
msgstr ""
|
2963 |
|
2964 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
|
|
|
|
|
|
|
|
2965 |
msgid "%1$s to %2$s"
|
2966 |
msgstr ""
|
2967 |
|
2968 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2969 |
msgid "Donation report for the current year for all forms"
|
2970 |
msgstr ""
|
2971 |
|
2972 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2973 |
msgid "Give - Democratizing Generosity"
|
2974 |
msgstr ""
|
2975 |
|
2976 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2977 |
msgid "Date Range: "
|
2978 |
msgstr ""
|
2979 |
|
2980 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2981 |
msgid "Table View"
|
2982 |
msgstr ""
|
2983 |
|
2984 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2985 |
msgid "Income to Date"
|
2986 |
msgstr ""
|
2987 |
|
2988 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2989 |
msgid "Graph View"
|
2990 |
msgstr ""
|
2991 |
|
2992 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2993 |
msgid "Donations by Month for all Give Forms"
|
2994 |
msgstr ""
|
2995 |
|
2996 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
2997 |
msgid "Jan"
|
2998 |
msgstr ""
|
2999 |
|
3000 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3001 |
msgid "Feb"
|
3002 |
msgstr ""
|
3003 |
|
3004 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3005 |
msgid "Mar"
|
3006 |
msgstr ""
|
3007 |
|
3008 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3009 |
msgid "Apr"
|
3010 |
msgstr ""
|
3011 |
|
3012 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3013 |
msgid "May"
|
3014 |
msgstr ""
|
3015 |
|
3016 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3017 |
msgid "June"
|
3018 |
msgstr ""
|
3019 |
|
3020 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3021 |
msgid "July"
|
3022 |
msgstr ""
|
3023 |
|
3024 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3025 |
msgid "Aug"
|
3026 |
msgstr ""
|
3027 |
|
3028 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3029 |
msgid "Sept"
|
3030 |
msgstr ""
|
3031 |
|
3032 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3033 |
msgid "Oct"
|
3034 |
msgstr ""
|
3035 |
|
3036 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3037 |
msgid "Nov"
|
3038 |
msgstr ""
|
3039 |
|
3040 |
-
#: includes/admin/tools/export/pdf-reports.php:
|
3041 |
msgid "Dec"
|
3042 |
msgstr ""
|
3043 |
|
@@ -3143,75 +3147,79 @@ msgstr ""
|
|
3143 |
msgid "Map to field"
|
3144 |
msgstr ""
|
3145 |
|
3146 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
|
|
|
|
|
|
|
|
3147 |
msgid "Upload CSV file"
|
3148 |
msgstr ""
|
3149 |
|
3150 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3151 |
msgid "Column mapping"
|
3152 |
msgstr ""
|
3153 |
|
3154 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3155 |
msgid "Done!"
|
3156 |
msgstr ""
|
3157 |
|
3158 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3159 |
msgid "Import donations from a CSV file"
|
3160 |
msgstr ""
|
3161 |
|
3162 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3163 |
msgid "This tool allows you to import or add donation data to your give form(s) via a CSV file."
|
3164 |
msgstr ""
|
3165 |
|
3166 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3167 |
msgid "Choose a CSV file:"
|
3168 |
msgstr ""
|
3169 |
|
3170 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3171 |
msgid "The file must be a Comma Seperated Version (CSV) file type only."
|
3172 |
msgstr ""
|
3173 |
|
3174 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3175 |
msgid "CSV Delimiter:"
|
3176 |
msgstr ""
|
3177 |
|
3178 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3179 |
msgid "In case your CSV file supports a different type of separator (or delimiter) -- like a tab or space -- you can set that here."
|
3180 |
msgstr ""
|
3181 |
|
3182 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3183 |
msgid "Comma"
|
3184 |
msgstr ""
|
3185 |
|
3186 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3187 |
msgid "Tab"
|
3188 |
msgstr ""
|
3189 |
|
3190 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3191 |
msgid "Test Mode:"
|
3192 |
msgstr ""
|
3193 |
|
3194 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3195 |
msgid "Test mode allows you to preview what this import would look like without making any actual changes to your site or your database."
|
3196 |
msgstr ""
|
3197 |
|
3198 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3199 |
msgid "Create WP users for new donors:"
|
3200 |
msgstr ""
|
3201 |
|
3202 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3203 |
msgid "The importer can create WordPress user accounts based on the names and email addresses of the donations in your CSV file. Enable this option if you'd like the importer to do that."
|
3204 |
msgstr ""
|
3205 |
|
3206 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3207 |
msgid "Delete CSV after import:"
|
3208 |
msgstr ""
|
3209 |
|
3210 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3211 |
msgid "Your CSV file will be uploaded via the WordPress Media Library. It's a good idea to delete it after the import is finished so that your sensitive data is not accessible on the web. Disable this only if you plan to delete the file manually later."
|
3212 |
msgstr ""
|
3213 |
|
3214 |
-
#: includes/admin/tools/import/class-give-import-donations.php:
|
3215 |
msgid "Please upload or provide a valid CSV file."
|
3216 |
msgstr ""
|
3217 |
|
@@ -4666,6 +4674,10 @@ msgstr ""
|
|
4666 |
msgid "Select a donation"
|
4667 |
msgstr ""
|
4668 |
|
|
|
|
|
|
|
|
|
4669 |
#: includes/class-give-html-elements.php:182
|
4670 |
msgid "Select a Donor"
|
4671 |
msgstr ""
|
@@ -4690,19 +4702,19 @@ msgstr ""
|
|
4690 |
msgid "Add-on Licenses"
|
4691 |
msgstr ""
|
4692 |
|
4693 |
-
#: includes/class-give-license-handler.php:
|
4694 |
msgid "You have invalid or expired license keys for one or more Give Add-ons. Please go to the <a href=\"%s\">licenses page</a> to correct this issue."
|
4695 |
msgstr ""
|
4696 |
|
4697 |
-
#: includes/class-give-license-handler.php:
|
4698 |
msgid "Your Give add-on license expired for payment <a href=\"%1$s\" target=\"_blank\">#%2$d</a>. <a href=\"%3$s\" target=\"_blank\">Click to renew an existing license</a> or %4$s."
|
4699 |
msgstr ""
|
4700 |
|
4701 |
-
#: includes/class-give-license-handler.php:
|
4702 |
msgid "Click here if already renewed"
|
4703 |
msgstr ""
|
4704 |
|
4705 |
-
#: includes/class-give-license-handler.php:
|
4706 |
msgid "Your Give add-on license will expire in %1$s for payment <a href=\"%2$s\" target=\"_blank\">#%3$d</a>. <a href=\"%4$s\" target=\"_blank\">Click to renew an existing license</a> or %5$s."
|
4707 |
msgstr ""
|
4708 |
|
@@ -5710,7 +5722,7 @@ msgstr ""
|
|
5710 |
msgid "District"
|
5711 |
msgstr ""
|
5712 |
|
5713 |
-
#: includes/country-functions.php:538, includes/country-functions.php:549, includes/country-functions.php:566, includes/country-functions.php:628, includes/country-functions.php:650, includes/country-functions.php:681, includes/country-functions.php:742, includes/country-functions.php:765, includes/country-functions.php:792
|
5714 |
msgid "Province"
|
5715 |
msgstr ""
|
5716 |
|
@@ -5718,11 +5730,11 @@ msgstr ""
|
|
5718 |
msgid "Canton"
|
5719 |
msgstr ""
|
5720 |
|
5721 |
-
#: includes/country-functions.php:561, includes/country-functions.php:617, includes/country-functions.php:687
|
5722 |
msgid "Region"
|
5723 |
msgstr ""
|
5724 |
|
5725 |
-
#: includes/country-functions.php:622, includes/country-functions.php:633, includes/country-functions.php:775
|
5726 |
msgid "County"
|
5727 |
msgstr ""
|
5728 |
|
@@ -8890,31 +8902,31 @@ msgstr ""
|
|
8890 |
msgid "Preview email with a donation:"
|
8891 |
msgstr ""
|
8892 |
|
8893 |
-
#: includes/formatting.php:
|
8894 |
msgid "%s arab"
|
8895 |
msgstr ""
|
8896 |
|
8897 |
-
#: includes/formatting.php:
|
8898 |
msgid "%s crore"
|
8899 |
msgstr ""
|
8900 |
|
8901 |
-
#: includes/formatting.php:
|
8902 |
msgid "%s lakh"
|
8903 |
msgstr ""
|
8904 |
|
8905 |
-
#: includes/formatting.php:
|
8906 |
msgid "%s trillion"
|
8907 |
msgstr ""
|
8908 |
|
8909 |
-
#: includes/formatting.php:
|
8910 |
msgid "%s billion"
|
8911 |
msgstr ""
|
8912 |
|
8913 |
-
#: includes/formatting.php:
|
8914 |
msgid "%s million"
|
8915 |
msgstr ""
|
8916 |
|
8917 |
-
#: includes/formatting.php:
|
8918 |
msgid "Nonce verification has failed."
|
8919 |
msgstr ""
|
8920 |
|
@@ -9410,27 +9422,31 @@ msgstr ""
|
|
9410 |
msgid "Donor Last Name"
|
9411 |
msgstr ""
|
9412 |
|
9413 |
-
#: includes/import-functions.php:
|
|
|
|
|
|
|
|
|
9414 |
msgid "Donor Email"
|
9415 |
msgstr ""
|
9416 |
|
9417 |
-
#: includes/import-functions.php:
|
9418 |
msgid "Donation Status"
|
9419 |
msgstr ""
|
9420 |
|
9421 |
-
#: includes/import-functions.php:
|
9422 |
-
msgid "
|
9423 |
msgstr ""
|
9424 |
|
9425 |
-
#: includes/import-functions.php:
|
9426 |
-
msgid "
|
9427 |
msgstr ""
|
9428 |
|
9429 |
-
#: includes/import-functions.php:
|
9430 |
msgid "Donation Form ID"
|
9431 |
msgstr ""
|
9432 |
|
9433 |
-
#: includes/import-functions.php:
|
9434 |
msgid "This donation was imported by %s"
|
9435 |
msgstr ""
|
9436 |
|
@@ -9478,175 +9494,175 @@ msgstr ""
|
|
9478 |
msgid "Passwords don't match."
|
9479 |
msgstr ""
|
9480 |
|
9481 |
-
#: includes/misc-functions.php:
|
9482 |
msgid "US Dollars ($)"
|
9483 |
msgstr ""
|
9484 |
|
9485 |
-
#: includes/misc-functions.php:
|
9486 |
msgid "Euros (€)"
|
9487 |
msgstr ""
|
9488 |
|
9489 |
-
#: includes/misc-functions.php:
|
9490 |
msgid "Pounds Sterling (£)"
|
9491 |
msgstr ""
|
9492 |
|
9493 |
-
#: includes/misc-functions.php:
|
9494 |
msgid "Australian Dollars ($)"
|
9495 |
msgstr ""
|
9496 |
|
9497 |
-
#: includes/misc-functions.php:
|
9498 |
msgid "Brazilian Real (R$)"
|
9499 |
msgstr ""
|
9500 |
|
9501 |
-
#: includes/misc-functions.php:
|
9502 |
msgid "Canadian Dollars ($)"
|
9503 |
msgstr ""
|
9504 |
|
9505 |
-
#: includes/misc-functions.php:
|
9506 |
msgid "Czech Koruna (Kč)"
|
9507 |
msgstr ""
|
9508 |
|
9509 |
-
#: includes/misc-functions.php:
|
9510 |
msgid "Danish Krone (kr.)"
|
9511 |
msgstr ""
|
9512 |
|
9513 |
-
#: includes/misc-functions.php:
|
9514 |
msgid "Hong Kong Dollar ($)"
|
9515 |
msgstr ""
|
9516 |
|
9517 |
-
#: includes/misc-functions.php:
|
9518 |
msgid "Hungarian Forint (Ft)"
|
9519 |
msgstr ""
|
9520 |
|
9521 |
-
#: includes/misc-functions.php:
|
9522 |
msgid "Israeli Shekel (₪)"
|
9523 |
msgstr ""
|
9524 |
|
9525 |
-
#: includes/misc-functions.php:
|
9526 |
msgid "Japanese Yen (¥)"
|
9527 |
msgstr ""
|
9528 |
|
9529 |
-
#: includes/misc-functions.php:
|
9530 |
msgid "Malaysian Ringgits (RM)"
|
9531 |
msgstr ""
|
9532 |
|
9533 |
-
#: includes/misc-functions.php:
|
9534 |
msgid "Mexican Peso ($)"
|
9535 |
msgstr ""
|
9536 |
|
9537 |
-
#: includes/misc-functions.php:
|
9538 |
msgid "Moroccan Dirham (.د.م)"
|
9539 |
msgstr ""
|
9540 |
|
9541 |
-
#: includes/misc-functions.php:
|
9542 |
msgid "New Zealand Dollar ($)"
|
9543 |
msgstr ""
|
9544 |
|
9545 |
-
#: includes/misc-functions.php:
|
9546 |
msgid "Norwegian Krone (Kr.)"
|
9547 |
msgstr ""
|
9548 |
|
9549 |
-
#: includes/misc-functions.php:
|
9550 |
msgid "Philippine Pesos (₱)"
|
9551 |
msgstr ""
|
9552 |
|
9553 |
-
#: includes/misc-functions.php:
|
9554 |
msgid "Polish Zloty (zł)"
|
9555 |
msgstr ""
|
9556 |
|
9557 |
-
#: includes/misc-functions.php:
|
9558 |
msgid "Singapore Dollar ($)"
|
9559 |
msgstr ""
|
9560 |
|
9561 |
-
#: includes/misc-functions.php:
|
9562 |
msgid "South Korean Won (₩)"
|
9563 |
msgstr ""
|
9564 |
|
9565 |
-
#: includes/misc-functions.php:
|
9566 |
msgid "South African Rand (R)"
|
9567 |
msgstr ""
|
9568 |
|
9569 |
-
#: includes/misc-functions.php:
|
9570 |
msgid "Swedish Krona (kr)"
|
9571 |
msgstr ""
|
9572 |
|
9573 |
-
#: includes/misc-functions.php:
|
9574 |
msgid "Swiss Franc (CHF)"
|
9575 |
msgstr ""
|
9576 |
|
9577 |
-
#: includes/misc-functions.php:
|
9578 |
msgid "Taiwan New Dollars (NT$)"
|
9579 |
msgstr ""
|
9580 |
|
9581 |
-
#: includes/misc-functions.php:
|
9582 |
msgid "Thai Baht (฿)"
|
9583 |
msgstr ""
|
9584 |
|
9585 |
-
#: includes/misc-functions.php:
|
9586 |
msgid "Indian Rupee (₹)"
|
9587 |
msgstr ""
|
9588 |
|
9589 |
-
#: includes/misc-functions.php:
|
9590 |
msgid "Turkish Lira (₺)"
|
9591 |
msgstr ""
|
9592 |
|
9593 |
-
#: includes/misc-functions.php:
|
9594 |
msgid "Iranian Rial (﷼)"
|
9595 |
msgstr ""
|
9596 |
|
9597 |
-
#: includes/misc-functions.php:
|
9598 |
-
msgid "Russian Rubles (
|
9599 |
msgstr ""
|
9600 |
|
9601 |
-
#: includes/misc-functions.php:
|
9602 |
msgid "Donation Form ID: %d"
|
9603 |
msgstr ""
|
9604 |
|
9605 |
-
#: includes/misc-functions.php:
|
9606 |
msgid "Untitled donation form"
|
9607 |
msgstr ""
|
9608 |
|
9609 |
-
#: includes/misc-functions.php:
|
9610 |
msgid "%1$s is <strong>deprecated</strong> since Give version %2$s! Use %3$s instead."
|
9611 |
msgstr ""
|
9612 |
|
9613 |
-
#: includes/misc-functions.php:
|
9614 |
msgid "%1$s is <strong>deprecated</strong> since Give version %2$s with no alternative available."
|
9615 |
msgstr ""
|
9616 |
|
9617 |
-
#: includes/misc-functions.php:
|
9618 |
msgid "Be sure to sign up for the Give newsletter below to stay informed of important updates and news."
|
9619 |
msgstr ""
|
9620 |
|
9621 |
-
#: includes/misc-functions.php:
|
9622 |
msgid "Thanks for Subscribing!"
|
9623 |
msgstr ""
|
9624 |
|
9625 |
-
#: includes/misc-functions.php:
|
9626 |
msgid "Email Address (required)"
|
9627 |
msgstr ""
|
9628 |
|
9629 |
-
#: includes/misc-functions.php:
|
9630 |
msgid "Subscribe"
|
9631 |
msgstr ""
|
9632 |
|
9633 |
-
#: includes/misc-functions.php:
|
9634 |
msgid "Donation Forms"
|
9635 |
msgstr ""
|
9636 |
|
9637 |
-
#: includes/misc-functions.php:
|
9638 |
msgid "array_column() expects at least 2 parameters, %s given."
|
9639 |
msgstr ""
|
9640 |
|
9641 |
-
#: includes/misc-functions.php:
|
9642 |
msgid "array_column() expects parameter 1 to be array, %s given."
|
9643 |
msgstr ""
|
9644 |
|
9645 |
-
#: includes/misc-functions.php:
|
9646 |
msgid "array_column(): The column key should be either a string or an integer."
|
9647 |
msgstr ""
|
9648 |
|
9649 |
-
#: includes/misc-functions.php:
|
9650 |
msgid "array_column(): The index key should be either a string or an integer."
|
9651 |
msgstr ""
|
9652 |
|
@@ -9654,19 +9670,19 @@ msgstr ""
|
|
9654 |
msgid "Status changed from %1$s to %2$s."
|
9655 |
msgstr ""
|
9656 |
|
9657 |
-
#: includes/payments/functions.php:
|
9658 |
msgid "Complete"
|
9659 |
msgstr ""
|
9660 |
|
9661 |
-
#: includes/payments/functions.php:
|
9662 |
msgid "Pre-Approved"
|
9663 |
msgstr ""
|
9664 |
|
9665 |
-
#: includes/payments/functions.php:
|
9666 |
msgid "Delete this donation note."
|
9667 |
msgstr ""
|
9668 |
|
9669 |
-
#: includes/payments/functions.php:
|
9670 |
msgctxt "custom donation dropdown item"
|
9671 |
msgid "Custom"
|
9672 |
msgstr ""
|
@@ -9683,10 +9699,6 @@ msgstr ""
|
|
9683 |
msgid "Edit Donation Form"
|
9684 |
msgstr ""
|
9685 |
|
9686 |
-
#: includes/post-types.php:47
|
9687 |
-
msgid "All Forms"
|
9688 |
-
msgstr ""
|
9689 |
-
|
9690 |
#: includes/post-types.php:49
|
9691 |
msgid "Search Forms"
|
9692 |
msgstr ""
|
@@ -10161,43 +10173,43 @@ msgstr ""
|
|
10161 |
msgid "Changes you made may not be saved."
|
10162 |
msgstr ""
|
10163 |
|
10164 |
-
#: includes/shortcodes.php:
|
10165 |
msgid "Return to All Donations"
|
10166 |
msgstr ""
|
10167 |
|
10168 |
-
#: includes/shortcodes.php:
|
10169 |
msgid "You must be logged in to view your donation history. Please login using your account or create an account using the same email you used to donate with."
|
10170 |
msgstr ""
|
10171 |
|
10172 |
-
#: includes/shortcodes.php:
|
10173 |
msgid "The shortcode is missing Donation Form ID attribute."
|
10174 |
msgstr ""
|
10175 |
|
10176 |
-
#: includes/shortcodes.php:
|
10177 |
msgid "The form does not have Goals enabled."
|
10178 |
msgstr ""
|
10179 |
|
10180 |
-
#: includes/shortcodes.php:
|
10181 |
msgid "You are missing the payment key to view this donation receipt."
|
10182 |
msgstr ""
|
10183 |
|
10184 |
-
#: includes/shortcodes.php:
|
10185 |
msgid "You must be logged in to view this donation receipt."
|
10186 |
msgstr ""
|
10187 |
|
10188 |
-
#: includes/shortcodes.php:
|
10189 |
msgid "Your Donor and User profile are no longer connected. Please contact the site administrator."
|
10190 |
msgstr ""
|
10191 |
|
10192 |
-
#: includes/shortcodes.php:
|
10193 |
msgid "The email you entered is empty."
|
10194 |
msgstr ""
|
10195 |
|
10196 |
-
#: includes/shortcodes.php:
|
10197 |
msgid "The email you entered is not valid. Please use another"
|
10198 |
msgstr ""
|
10199 |
|
10200 |
-
#: includes/shortcodes.php:
|
10201 |
msgid "The email you entered belongs to another user. Please use another."
|
10202 |
msgstr ""
|
10203 |
|
@@ -10309,15 +10321,15 @@ msgstr ""
|
|
10309 |
msgid "An email with an access link has been sent to %s."
|
10310 |
msgstr ""
|
10311 |
|
10312 |
-
#: templates/history-donations.php:
|
10313 |
msgid "View"
|
10314 |
msgstr ""
|
10315 |
|
10316 |
-
#: templates/history-donations.php:
|
10317 |
msgid "View Receipt »"
|
10318 |
msgstr ""
|
10319 |
|
10320 |
-
#: templates/history-donations.php:
|
10321 |
msgid "It looks like you haven't made any donations."
|
10322 |
msgstr ""
|
10323 |
|
48 |
msgid "If you cannot upgrade your PHP version yourself, you can send an email to your host. If they don't want to upgrade your PHP version, we would suggest you switch hosts. Have a look at one of the recommended %1$sWordPress hosting partners%2$s."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: includes/actions.php:103
|
52 |
msgid "WordPress user #%d is connected to #%d"
|
53 |
msgstr ""
|
54 |
|
64 |
msgid "You do not have permission to install plugin updates"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: includes/admin/EDD_SL_Plugin_Updater.php:396, includes/admin/donors/donor-actions.php:31, includes/admin/donors/donor-actions.php:45, includes/admin/donors/donor-actions.php:151, includes/admin/donors/donor-actions.php:165, includes/admin/donors/donor-actions.php:233, includes/admin/donors/donor-actions.php:248, includes/admin/donors/donor-actions.php:332, includes/admin/donors/donor-actions.php:346, includes/admin/donors/donor-actions.php:435, includes/admin/donors/donor-actions.php:530, includes/admin/donors/donor-actions.php:576, includes/admin/forms/dashboard-columns.php:244, includes/admin/payments/actions.php:31, includes/admin/payments/actions.php:89, includes/admin/payments/actions.php:100, includes/admin/payments/actions.php:342, includes/admin/payments/actions.php:362, includes/admin/payments/actions.php:395, includes/admin/payments/actions.php:417, includes/admin/payments/view-payment-details.php:24, includes/admin/payments/view-payment-details.php:34, includes/admin/tools/data/class-give-tools-delete-import-donors.php:257, includes/admin/tools/data/class-give-tools-delete-test-donors.php:228, includes/admin/tools/data/class-give-tools-delete-test-transactions.php:172, includes/admin/tools/data/class-give-tools-recount-all-stats.php:235, includes/admin/tools/data/class-give-tools-recount-donor-stats.php:195, includes/admin/tools/data/class-give-tools-recount-form-stats.php:180, includes/admin/tools/data/class-give-tools-recount-income.php:156, includes/admin/tools/data/class-give-tools-recount-single-donor-stats.php:151, includes/admin/tools/data/class-give-tools-reset-stats.php:187, includes/admin/tools/export/class-batch-export.php:145, includes/admin/tools/export/class-export.php:177, includes/admin/tools/export/export-actions.php:26, includes/admin/tools/export/pdf-reports.php:31, includes/admin/tools/export/pdf-reports.php:35, includes/admin/tools/export/pdf-reports.php:39, includes/admin/tools/logs/class-api-requests-logs-list-table.php:141, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:128, includes/admin/upgrades/upgrade-functions.php:168, includes/admin/upgrades/upgrade-functions.php:206, includes/api/class-give-api.php:1791, includes/api/class-give-api.php:1797, includes/api/class-give-api.php:1812, includes/api/class-give-api.php:1817, includes/class-give-license-handler.php:847, includes/class-notices.php:551, includes/emails/actions.php:56, includes/emails/template.php:274, includes/formatting.php:708, includes/gateways/manual.php:38
|
68 |
msgid "Error"
|
69 |
msgstr ""
|
70 |
|
208 |
msgid "Thanks :)"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: includes/admin/admin-pages.php:39, includes/admin/admin-pages.php:39, includes/admin/donors/class-donor-table.php:66, includes/admin/reports/class-donor-reports-table.php:67, includes/admin/tools/import/class-give-import-donations.php:497
|
212 |
msgid "Donors"
|
213 |
msgstr ""
|
214 |
|
504 |
msgid "Gateways Settings"
|
505 |
msgstr ""
|
506 |
|
507 |
+
#: includes/admin/class-give-settings.php:315, includes/admin/settings/class-settings-gateways.php:181, includes/admin/tools/views/html-admin-page-system-info.php:438, includes/import-functions.php:396
|
508 |
msgid "Test Mode"
|
509 |
msgstr ""
|
510 |
|
1055 |
msgstr[0] ""
|
1056 |
msgstr[1] ""
|
1057 |
|
1058 |
+
#: includes/admin/donors/class-donor-table.php:65, includes/admin/reports/class-donor-reports-table.php:66, includes/admin/tools/logs/class-sales-logs-list-table.php:115, templates/history-donations.php:28, templates/shortcode-receipt.php:38
|
1059 |
msgid "Donor"
|
1060 |
msgstr ""
|
1061 |
|
1071 |
msgid "Email"
|
1072 |
msgstr ""
|
1073 |
|
1074 |
+
#: includes/admin/donors/class-donor-table.php:169, includes/admin/forms/dashboard-columns.php:40, includes/admin/reports/class-donor-reports-table.php:217, includes/admin/reports/class-form-reports-table.php:121, includes/admin/reports/graphing.php:181, includes/admin/reports/graphing.php:427, includes/admin/tools/class-settings-logs.php:120, includes/admin/tools/export/class-batch-export-forms.php:56, includes/admin/tools/export/class-export-earnings.php:65, includes/admin/tools/export/pdf-reports.php:298, includes/admin/tools/import/class-give-import-donations.php:491, includes/deprecated/deprecated-functions.php:70, includes/post-types.php:53, includes/post-types.php:107
|
1075 |
msgid "Donations"
|
1076 |
msgstr ""
|
1077 |
|
1095 |
msgid "Notes for \"%s\""
|
1096 |
msgstr ""
|
1097 |
|
1098 |
+
#: includes/admin/donors/class-donor-table.php:213, includes/admin/donors/donors.php:686, includes/import-functions.php:395
|
1099 |
msgid "Notes"
|
1100 |
msgstr ""
|
1101 |
|
1103 |
msgid "Delete \"%s\""
|
1104 |
msgstr ""
|
1105 |
|
1106 |
+
#: includes/admin/donors/class-donor-table.php:215, includes/admin/payments/class-payments-table.php:508, includes/admin/payments/class-payments-table.php:612, includes/payments/functions.php:1630
|
1107 |
msgid "Delete"
|
1108 |
msgstr ""
|
1109 |
|
1159 |
msgid "An error has occurred. Please try again."
|
1160 |
msgstr ""
|
1161 |
|
1162 |
+
#: includes/admin/donors/donor-actions.php:453, includes/admin/tools/export/export-actions.php:26, includes/admin/tools/export/pdf-reports.php:35, includes/api/class-give-api.php:1791, includes/class-give-license-handler.php:847, includes/gateways/manual.php:38
|
1163 |
msgid "Nonce verification failed."
|
1164 |
msgstr ""
|
1165 |
|
1179 |
msgid "Email successfully added to donor."
|
1180 |
msgstr ""
|
1181 |
|
1182 |
+
#: includes/admin/donors/donor-actions.php:486, includes/admin/donors/donor-actions.php:539, includes/admin/donors/donor-actions.php:586, includes/payments/functions.php:1615
|
1183 |
msgid "System"
|
1184 |
msgstr ""
|
1185 |
|
1333 |
msgid "Recent Donations"
|
1334 |
msgstr ""
|
1335 |
|
1336 |
+
#: includes/admin/donors/donors.php:544, includes/admin/forms/class-metabox-form-data.php:207, includes/admin/tools/export/class-batch-export-forms.php:44, includes/admin/tools/export/class-batch-export-payments.php:42, includes/admin/tools/export/class-export.php:72, templates/history-donations.php:26
|
1337 |
msgid "ID"
|
1338 |
msgstr ""
|
1339 |
|
1340 |
+
#: includes/admin/donors/donors.php:545, includes/admin/forms/class-metabox-form-data.php:212, includes/admin/forms/class-metabox-form-data.php:384, includes/admin/forms/dashboard-columns.php:38, includes/admin/payments/class-payments-table.php:353, includes/admin/tools/export/class-batch-export-payments.php:55, templates/history-donations.php:29
|
1341 |
msgid "Amount"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: includes/admin/donors/donors.php:546, includes/admin/forms/dashboard-columns.php:43, includes/admin/payments/class-payments-table.php:352, includes/admin/tools/export/class-batch-export-payments.php:59, includes/admin/tools/export/class-export-earnings.php:64, includes/admin/tools/export/class-export.php:73, includes/admin/tools/logs/class-api-requests-logs-list-table.php:96, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:131, includes/admin/tools/logs/class-sales-logs-list-table.php:120, templates/history-donations.php:27, templates/shortcode-receipt.php:44
|
1345 |
msgid "Date"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: includes/admin/donors/donors.php:547, includes/admin/payments/class-payments-table.php:351, includes/admin/tools/export/class-batch-export-forms.php:51, includes/admin/tools/export/class-batch-export-payments.php:61, includes/admin/tools/logs/class-sales-logs-list-table.php:118, templates/history-donations.php:30
|
1349 |
msgid "Status"
|
1350 |
msgstr ""
|
1351 |
|
1437 |
msgid "Dropdown"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
+
#: includes/admin/forms/class-metabox-form-data.php:159, includes/misc-functions.php:716, includes/misc-functions.php:726, includes/payments/functions.php:1829
|
1441 |
msgid "Custom Amount"
|
1442 |
msgstr ""
|
1443 |
|
1445 |
msgid "Do you want the user to be able to input their own donation amount?"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
+
#: includes/admin/forms/class-metabox-form-data.php:165, includes/admin/forms/class-metabox-form-data.php:301, includes/admin/forms/class-metabox-form-data.php:326, includes/admin/forms/class-metabox-form-data.php:359, includes/admin/forms/class-metabox-form-data.php:405, includes/admin/forms/class-metabox-form-data.php:445, includes/admin/settings/class-settings-advanced.php:83, includes/admin/settings/class-settings-advanced.php:105, includes/admin/settings/class-settings-display.php:62, includes/admin/settings/class-settings-display.php:74, includes/admin/settings/class-settings-display.php:86, includes/admin/settings/class-settings-display.php:117, includes/admin/settings/class-settings-display.php:128, includes/admin/settings/class-settings-display.php:139, includes/admin/settings/class-settings-display.php:150, includes/admin/settings/class-settings-display.php:169, includes/admin/settings/class-settings-display.php:200, includes/admin/settings/class-settings-display.php:211, includes/admin/settings/class-settings-display.php:242, includes/admin/settings/class-settings-email.php:149, includes/admin/settings/class-settings-gateways.php:85, includes/admin/settings/class-settings-gateways.php:96, includes/admin/settings/class-settings-gateways.php:128, includes/admin/settings/class-settings-gateways.php:187, includes/admin/settings/class-settings-general.php:74, includes/admin/tools/import/class-give-import-donations.php:761, includes/admin/tools/import/class-give-import-donations.php:772, includes/admin/tools/import/class-give-import-donations.php:783, includes/admin/tools/views/html-admin-page-system-info.php:440, includes/admin/tools/views/html-admin-page-system-info.php:518, includes/admin/tools/views/html-admin-page-system-info.php:550, includes/admin/tools/views/html-admin-page-system-info.php:555, includes/admin/tools/views/html-admin-page-system-info.php:570, includes/admin/tools/views/html-admin-page-system-info.php:575, includes/admin/tools/views/html-admin-page-system-info.php:596, includes/admin/tools/views/html-admin-page-system-info.php:601, includes/gateways/offline-donations.php:323
|
1449 |
msgid "Enabled"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
+
#: includes/admin/forms/class-metabox-form-data.php:166, includes/admin/forms/class-metabox-form-data.php:302, includes/admin/forms/class-metabox-form-data.php:327, includes/admin/forms/class-metabox-form-data.php:360, includes/admin/forms/class-metabox-form-data.php:406, includes/admin/forms/class-metabox-form-data.php:446, includes/admin/settings/class-settings-advanced.php:84, includes/admin/settings/class-settings-advanced.php:106, includes/admin/settings/class-settings-display.php:63, includes/admin/settings/class-settings-display.php:75, includes/admin/settings/class-settings-display.php:87, includes/admin/settings/class-settings-display.php:118, includes/admin/settings/class-settings-display.php:129, includes/admin/settings/class-settings-display.php:140, includes/admin/settings/class-settings-display.php:151, includes/admin/settings/class-settings-display.php:170, includes/admin/settings/class-settings-display.php:201, includes/admin/settings/class-settings-display.php:212, includes/admin/settings/class-settings-display.php:243, includes/admin/settings/class-settings-email.php:150, includes/admin/settings/class-settings-gateways.php:86, includes/admin/settings/class-settings-gateways.php:97, includes/admin/settings/class-settings-gateways.php:129, includes/admin/settings/class-settings-gateways.php:188, includes/admin/settings/class-settings-general.php:75, includes/admin/tools/import/class-give-import-donations.php:762, includes/admin/tools/import/class-give-import-donations.php:773, includes/admin/tools/import/class-give-import-donations.php:784, includes/admin/tools/views/html-admin-page-system-info.php:440, includes/admin/tools/views/html-admin-page-system-info.php:518, includes/admin/tools/views/html-admin-page-system-info.php:550, includes/admin/tools/views/html-admin-page-system-info.php:555, includes/admin/tools/views/html-admin-page-system-info.php:570, includes/admin/tools/views/html-admin-page-system-info.php:575, includes/admin/tools/views/html-admin-page-system-info.php:596, includes/admin/tools/views/html-admin-page-system-info.php:601, includes/gateways/offline-donations.php:324
|
1453 |
msgid "Disabled"
|
1454 |
msgstr ""
|
1455 |
|
1461 |
msgid "Enter the minimum custom donation amount."
|
1462 |
msgstr ""
|
1463 |
|
1464 |
+
#: includes/admin/forms/class-metabox-form-data.php:183, includes/import-functions.php:437
|
1465 |
msgid "Custom Amount Text"
|
1466 |
msgstr ""
|
1467 |
|
1477 |
msgid "Add Level"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
+
#: includes/admin/forms/class-metabox-form-data.php:199, includes/admin/forms/class-metabox-form-data.php:226, includes/import-functions.php:436
|
1481 |
msgid "Donation Level"
|
1482 |
msgstr ""
|
1483 |
|
1705 |
msgid "This is the actual text which the user will have to agree to in order to make a donation."
|
1706 |
msgstr ""
|
1707 |
|
1708 |
+
#: includes/admin/forms/dashboard-columns.php:36, includes/admin/tools/export/class-batch-export-forms.php:52, includes/admin/tools/export/pdf-reports.php:100, includes/post-types.php:151
|
1709 |
msgid "Categories"
|
1710 |
msgstr ""
|
1711 |
|
1712 |
+
#: includes/admin/forms/dashboard-columns.php:37, includes/admin/tools/export/class-batch-export-forms.php:53, includes/admin/tools/export/pdf-reports.php:105, includes/post-types.php:191
|
1713 |
msgid "Tags"
|
1714 |
msgstr ""
|
1715 |
|
1717 |
msgid "Goal"
|
1718 |
msgstr ""
|
1719 |
|
1720 |
+
#: includes/admin/forms/dashboard-columns.php:41, includes/admin/reports/class-earnings-report.php:46, includes/admin/reports/class-earnings-report.php:98, includes/admin/reports/class-form-reports-table.php:122, includes/admin/reports/graphing.php:180, includes/admin/reports/graphing.php:426, includes/admin/reports/reports.php:103, includes/admin/tools/export/class-batch-export-forms.php:57, includes/admin/tools/export/pdf-reports.php:268
|
1721 |
msgid "Income"
|
1722 |
msgstr ""
|
1723 |
|
1797 |
msgid "Completed"
|
1798 |
msgstr ""
|
1799 |
|
1800 |
+
#: includes/admin/payments/class-payments-table.php:277, includes/payments/functions.php:669
|
1801 |
msgid "Pending"
|
1802 |
msgstr ""
|
1803 |
|
1804 |
+
#: includes/admin/payments/class-payments-table.php:281, includes/payments/functions.php:676
|
1805 |
msgid "Processing"
|
1806 |
msgstr ""
|
1807 |
|
1808 |
+
#: includes/admin/payments/class-payments-table.php:285, includes/payments/functions.php:671, includes/post-types.php:299
|
1809 |
msgid "Refunded"
|
1810 |
msgstr ""
|
1811 |
|
1812 |
+
#: includes/admin/payments/class-payments-table.php:289, includes/payments/functions.php:677, includes/post-types.php:315
|
1813 |
msgid "Revoked"
|
1814 |
msgstr ""
|
1815 |
|
1816 |
+
#: includes/admin/payments/class-payments-table.php:293, includes/payments/functions.php:672, includes/post-types.php:307
|
1817 |
msgid "Failed"
|
1818 |
msgstr ""
|
1819 |
|
1820 |
+
#: includes/admin/payments/class-payments-table.php:297, includes/payments/functions.php:673, includes/post-types.php:323
|
1821 |
msgid "Cancelled"
|
1822 |
msgstr ""
|
1823 |
|
1824 |
+
#: includes/admin/payments/class-payments-table.php:301, includes/payments/functions.php:674, includes/post-types.php:331
|
1825 |
msgid "Abandoned"
|
1826 |
msgstr ""
|
1827 |
|
1829 |
msgid "Preapproval Pending"
|
1830 |
msgstr ""
|
1831 |
|
1832 |
+
#: includes/admin/payments/class-payments-table.php:350, includes/admin/shortcodes/shortcode-give-form.php:27, includes/admin/shortcodes/shortcode-give-form.php:28, includes/admin/tools/export/class-batch-export-donors.php:165, includes/admin/tools/views/html-admin-page-exports.php:231, includes/post-types.php:54
|
1833 |
msgid "Donation Form"
|
1834 |
msgstr ""
|
1835 |
|
1836 |
+
#: includes/admin/payments/class-payments-table.php:354, includes/admin/tools/logs/class-gateway-error-logs-list-table.php:132, templates/history-donations.php:32
|
1837 |
msgid "Details"
|
1838 |
msgstr ""
|
1839 |
|
1885 |
msgid "This donation was imported."
|
1886 |
msgstr ""
|
1887 |
|
1888 |
+
#: includes/admin/payments/class-payments-table.php:531, includes/admin/tools/class-settings-import.php:41, includes/admin/tools/class-settings-import.php:89, includes/admin/tools/import/class-give-import-donations.php:651
|
1889 |
msgid "Import"
|
1890 |
msgstr ""
|
1891 |
|
2145 |
msgid "Donation Forms Report"
|
2146 |
msgstr ""
|
2147 |
|
2148 |
+
#: includes/admin/reports/class-forms-report.php:46, includes/admin/reports/class-forms-report.php:93, includes/admin/reports/reports.php:104, includes/admin/tools/import/class-give-import-donations.php:503, includes/post-types.php:229
|
2149 |
msgid "Forms"
|
2150 |
msgstr ""
|
2151 |
|
2322 |
msgstr ""
|
2323 |
|
2324 |
#: includes/admin/settings/class-settings-advanced.php:100
|
2325 |
+
msgid "Add a layer of SPAM protection to your donation submissions with Akismet. When enabled, donation submissions will be first sent to Akismet's API if you have the plugin activated and configured."
|
2326 |
msgstr ""
|
2327 |
|
2328 |
#: includes/admin/settings/class-settings-advanced.php:110
|
2625 |
msgid "<a href=\"%s\">Create</a> a new Donation Form."
|
2626 |
msgstr ""
|
2627 |
|
2628 |
+
#: includes/admin/shortcodes/shortcode-give-form.php:53, includes/admin/shortcodes/shortcode-give-form.php:54, includes/admin/shortcodes/shortcode-give-goal.php:54, includes/admin/shortcodes/shortcode-give-goal.php:55
|
2629 |
msgid "Select a Donation Form"
|
2630 |
msgstr ""
|
2631 |
|
2633 |
msgid "You must first select a Form!"
|
2634 |
msgstr ""
|
2635 |
|
2636 |
+
#: includes/admin/shortcodes/shortcode-give-form.php:57, includes/admin/shortcodes/shortcode-give-goal.php:58, includes/admin/tools/export/pdf-reports.php:184, includes/ajax-functions.php:301, includes/class-give-cli-commands.php:208, includes/class-give-html-elements.php:141, includes/post-types.php:50
|
2637 |
msgid "No forms found."
|
2638 |
msgstr ""
|
2639 |
|
2849 |
msgid "State"
|
2850 |
msgstr ""
|
2851 |
|
2852 |
+
#: includes/admin/tools/export/class-batch-export-donors.php:158, includes/import-functions.php:389
|
2853 |
msgid "Zip"
|
2854 |
msgstr ""
|
2855 |
|
2856 |
+
#: includes/admin/tools/export/class-batch-export-donors.php:159, includes/admin/tools/export/class-batch-export-payments.php:51, includes/forms/template.php:933, includes/import-functions.php:383, templates/shortcode-profile-editor.php:152
|
2857 |
msgid "Country"
|
2858 |
msgstr ""
|
2859 |
|
2860 |
+
#: includes/admin/tools/export/class-batch-export-donors.php:162, includes/admin/tools/views/html-admin-page-exports.php:224, includes/import-functions.php:416
|
2861 |
msgid "User ID"
|
2862 |
msgstr ""
|
2863 |
|
2865 |
msgid "First Donation Date"
|
2866 |
msgstr ""
|
2867 |
|
2868 |
+
#: includes/admin/tools/export/class-batch-export-donors.php:171, includes/admin/tools/export/pdf-reports.php:108, includes/admin/tools/views/html-admin-page-exports.php:245
|
2869 |
msgid "Number of Donations"
|
2870 |
msgstr ""
|
2871 |
|
2889 |
msgid "Excerpt"
|
2890 |
msgstr ""
|
2891 |
|
2892 |
+
#: includes/admin/tools/export/class-batch-export-forms.php:54, includes/admin/tools/export/pdf-reports.php:96
|
2893 |
msgid "Price"
|
2894 |
msgstr ""
|
2895 |
|
2901 |
msgid "Payment Number"
|
2902 |
msgstr ""
|
2903 |
|
2904 |
+
#: includes/admin/tools/export/class-batch-export-payments.php:45, includes/forms/template.php:640, includes/forms/template.php:651, includes/misc-functions.php:1054, includes/misc-functions.php:1056, templates/shortcode-profile-editor.php:46
|
2905 |
msgid "First Name"
|
2906 |
msgstr ""
|
2907 |
|
2908 |
+
#: includes/admin/tools/export/class-batch-export-payments.php:46, includes/forms/template.php:660, includes/forms/template.php:673, includes/misc-functions.php:1060, includes/misc-functions.php:1062, templates/shortcode-profile-editor.php:51
|
2909 |
msgid "Last Name"
|
2910 |
msgstr ""
|
2911 |
|
2913 |
msgid "Form ID"
|
2914 |
msgstr ""
|
2915 |
|
2916 |
+
#: includes/admin/tools/export/class-batch-export-payments.php:54, includes/admin/tools/export/pdf-reports.php:95
|
2917 |
msgid "Form Name"
|
2918 |
msgstr ""
|
2919 |
|
2920 |
+
#: includes/admin/tools/export/class-batch-export-payments.php:56, includes/import-functions.php:394, templates/history-donations.php:31, templates/shortcode-receipt.php:80
|
2921 |
msgid "Payment Method"
|
2922 |
msgstr ""
|
2923 |
|
2961 |
msgid "You do not have permission to generate PDF sales reports."
|
2962 |
msgstr ""
|
2963 |
|
2964 |
+
#: includes/admin/tools/export/pdf-reports.php:39
|
2965 |
+
msgid "Dependency missing."
|
2966 |
+
msgstr ""
|
2967 |
+
|
2968 |
+
#: includes/admin/tools/export/pdf-reports.php:47, includes/admin/tools/views/html-admin-page-exports.php:68
|
2969 |
msgid "%1$s to %2$s"
|
2970 |
msgstr ""
|
2971 |
|
2972 |
+
#: includes/admin/tools/export/pdf-reports.php:70, includes/admin/tools/export/pdf-reports.php:81
|
2973 |
msgid "Donation report for the current year for all forms"
|
2974 |
msgstr ""
|
2975 |
|
2976 |
+
#: includes/admin/tools/export/pdf-reports.php:71, includes/admin/tools/export/pdf-reports.php:72, includes/admin/welcome.php:184
|
2977 |
msgid "Give - Democratizing Generosity"
|
2978 |
msgstr ""
|
2979 |
|
2980 |
+
#: includes/admin/tools/export/pdf-reports.php:86
|
2981 |
msgid "Date Range: "
|
2982 |
msgstr ""
|
2983 |
|
2984 |
+
#: includes/admin/tools/export/pdf-reports.php:90
|
2985 |
msgid "Table View"
|
2986 |
msgstr ""
|
2987 |
|
2988 |
+
#: includes/admin/tools/export/pdf-reports.php:109
|
2989 |
msgid "Income to Date"
|
2990 |
msgstr ""
|
2991 |
|
2992 |
+
#: includes/admin/tools/export/pdf-reports.php:193
|
2993 |
msgid "Graph View"
|
2994 |
msgstr ""
|
2995 |
|
2996 |
+
#: includes/admin/tools/export/pdf-reports.php:302
|
2997 |
msgid "Donations by Month for all Give Forms"
|
2998 |
msgstr ""
|
2999 |
|
3000 |
+
#: includes/admin/tools/export/pdf-reports.php:313
|
3001 |
msgid "Jan"
|
3002 |
msgstr ""
|
3003 |
|
3004 |
+
#: includes/admin/tools/export/pdf-reports.php:314
|
3005 |
msgid "Feb"
|
3006 |
msgstr ""
|
3007 |
|
3008 |
+
#: includes/admin/tools/export/pdf-reports.php:315
|
3009 |
msgid "Mar"
|
3010 |
msgstr ""
|
3011 |
|
3012 |
+
#: includes/admin/tools/export/pdf-reports.php:316
|
3013 |
msgid "Apr"
|
3014 |
msgstr ""
|
3015 |
|
3016 |
+
#: includes/admin/tools/export/pdf-reports.php:317
|
3017 |
msgid "May"
|
3018 |
msgstr ""
|
3019 |
|
3020 |
+
#: includes/admin/tools/export/pdf-reports.php:318
|
3021 |
msgid "June"
|
3022 |
msgstr ""
|
3023 |
|
3024 |
+
#: includes/admin/tools/export/pdf-reports.php:319
|
3025 |
msgid "July"
|
3026 |
msgstr ""
|
3027 |
|
3028 |
+
#: includes/admin/tools/export/pdf-reports.php:320
|
3029 |
msgid "Aug"
|
3030 |
msgstr ""
|
3031 |
|
3032 |
+
#: includes/admin/tools/export/pdf-reports.php:321
|
3033 |
msgid "Sept"
|
3034 |
msgstr ""
|
3035 |
|
3036 |
+
#: includes/admin/tools/export/pdf-reports.php:322
|
3037 |
msgid "Oct"
|
3038 |
msgstr ""
|
3039 |
|
3040 |
+
#: includes/admin/tools/export/pdf-reports.php:323
|
3041 |
msgid "Nov"
|
3042 |
msgstr ""
|
3043 |
|
3044 |
+
#: includes/admin/tools/export/pdf-reports.php:324
|
3045 |
msgid "Dec"
|
3046 |
msgstr ""
|
3047 |
|
3147 |
msgid "Map to field"
|
3148 |
msgstr ""
|
3149 |
|
3150 |
+
#: includes/admin/tools/import/class-give-import-donations.php:465, includes/import-functions.php:397
|
3151 |
+
msgid "Import as Meta"
|
3152 |
+
msgstr ""
|
3153 |
+
|
3154 |
+
#: includes/admin/tools/import/class-give-import-donations.php:645
|
3155 |
msgid "Upload CSV file"
|
3156 |
msgstr ""
|
3157 |
|
3158 |
+
#: includes/admin/tools/import/class-give-import-donations.php:648
|
3159 |
msgid "Column mapping"
|
3160 |
msgstr ""
|
3161 |
|
3162 |
+
#: includes/admin/tools/import/class-give-import-donations.php:654
|
3163 |
msgid "Done!"
|
3164 |
msgstr ""
|
3165 |
|
3166 |
+
#: includes/admin/tools/import/class-give-import-donations.php:705
|
3167 |
msgid "Import donations from a CSV file"
|
3168 |
msgstr ""
|
3169 |
|
3170 |
+
#: includes/admin/tools/import/class-give-import-donations.php:706
|
3171 |
msgid "This tool allows you to import or add donation data to your give form(s) via a CSV file."
|
3172 |
msgstr ""
|
3173 |
|
3174 |
+
#: includes/admin/tools/import/class-give-import-donations.php:731
|
3175 |
msgid "Choose a CSV file:"
|
3176 |
msgstr ""
|
3177 |
|
3178 |
+
#: includes/admin/tools/import/class-give-import-donations.php:734
|
3179 |
msgid "The file must be a Comma Seperated Version (CSV) file type only."
|
3180 |
msgstr ""
|
3181 |
|
3182 |
+
#: includes/admin/tools/import/class-give-import-donations.php:745
|
3183 |
msgid "CSV Delimiter:"
|
3184 |
msgstr ""
|
3185 |
|
3186 |
+
#: includes/admin/tools/import/class-give-import-donations.php:746
|
3187 |
msgid "In case your CSV file supports a different type of separator (or delimiter) -- like a tab or space -- you can set that here."
|
3188 |
msgstr ""
|
3189 |
|
3190 |
+
#: includes/admin/tools/import/class-give-import-donations.php:750
|
3191 |
msgid "Comma"
|
3192 |
msgstr ""
|
3193 |
|
3194 |
+
#: includes/admin/tools/import/class-give-import-donations.php:751
|
3195 |
msgid "Tab"
|
3196 |
msgstr ""
|
3197 |
|
3198 |
+
#: includes/admin/tools/import/class-give-import-donations.php:756
|
3199 |
msgid "Test Mode:"
|
3200 |
msgstr ""
|
3201 |
|
3202 |
+
#: includes/admin/tools/import/class-give-import-donations.php:757
|
3203 |
msgid "Test mode allows you to preview what this import would look like without making any actual changes to your site or your database."
|
3204 |
msgstr ""
|
3205 |
|
3206 |
+
#: includes/admin/tools/import/class-give-import-donations.php:767
|
3207 |
msgid "Create WP users for new donors:"
|
3208 |
msgstr ""
|
3209 |
|
3210 |
+
#: includes/admin/tools/import/class-give-import-donations.php:768
|
3211 |
msgid "The importer can create WordPress user accounts based on the names and email addresses of the donations in your CSV file. Enable this option if you'd like the importer to do that."
|
3212 |
msgstr ""
|
3213 |
|
3214 |
+
#: includes/admin/tools/import/class-give-import-donations.php:778
|
3215 |
msgid "Delete CSV after import:"
|
3216 |
msgstr ""
|
3217 |
|
3218 |
+
#: includes/admin/tools/import/class-give-import-donations.php:779
|
3219 |
msgid "Your CSV file will be uploaded via the WordPress Media Library. It's a good idea to delete it after the import is finished so that your sensitive data is not accessible on the web. Disable this only if you plan to delete the file manually later."
|
3220 |
msgstr ""
|
3221 |
|
3222 |
+
#: includes/admin/tools/import/class-give-import-donations.php:858, includes/admin/tools/import/class-give-import-donations.php:862
|
3223 |
msgid "Please upload or provide a valid CSV file."
|
3224 |
msgstr ""
|
3225 |
|
4674 |
msgid "Select a donation"
|
4675 |
msgstr ""
|
4676 |
|
4677 |
+
#: includes/class-give-html-elements.php:112, includes/post-types.php:47
|
4678 |
+
msgid "All Forms"
|
4679 |
+
msgstr ""
|
4680 |
+
|
4681 |
#: includes/class-give-html-elements.php:182
|
4682 |
msgid "Select a Donor"
|
4683 |
msgstr ""
|
4702 |
msgid "Add-on Licenses"
|
4703 |
msgstr ""
|
4704 |
|
4705 |
+
#: includes/class-give-license-handler.php:590, includes/class-give-license-handler.php:679
|
4706 |
msgid "You have invalid or expired license keys for one or more Give Add-ons. Please go to the <a href=\"%s\">licenses page</a> to correct this issue."
|
4707 |
msgstr ""
|
4708 |
|
4709 |
+
#: includes/class-give-license-handler.php:627
|
4710 |
msgid "Your Give add-on license expired for payment <a href=\"%1$s\" target=\"_blank\">#%2$d</a>. <a href=\"%3$s\" target=\"_blank\">Click to renew an existing license</a> or %4$s."
|
4711 |
msgstr ""
|
4712 |
|
4713 |
+
#: includes/class-give-license-handler.php:632, includes/class-give-license-handler.php:651
|
4714 |
msgid "Click here if already renewed"
|
4715 |
msgstr ""
|
4716 |
|
4717 |
+
#: includes/class-give-license-handler.php:645
|
4718 |
msgid "Your Give add-on license will expire in %1$s for payment <a href=\"%2$s\" target=\"_blank\">#%3$d</a>. <a href=\"%4$s\" target=\"_blank\">Click to renew an existing license</a> or %5$s."
|
4719 |
msgstr ""
|
4720 |
|
5722 |
msgid "District"
|
5723 |
msgstr ""
|
5724 |
|
5725 |
+
#: includes/country-functions.php:538, includes/country-functions.php:549, includes/country-functions.php:566, includes/country-functions.php:628, includes/country-functions.php:650, includes/country-functions.php:681, includes/country-functions.php:742, includes/country-functions.php:765, includes/country-functions.php:792, includes/import-functions.php:386
|
5726 |
msgid "Province"
|
5727 |
msgstr ""
|
5728 |
|
5730 |
msgid "Canton"
|
5731 |
msgstr ""
|
5732 |
|
5733 |
+
#: includes/country-functions.php:561, includes/country-functions.php:617, includes/country-functions.php:687, includes/import-functions.php:385
|
5734 |
msgid "Region"
|
5735 |
msgstr ""
|
5736 |
|
5737 |
+
#: includes/country-functions.php:622, includes/country-functions.php:633, includes/country-functions.php:775, includes/import-functions.php:384
|
5738 |
msgid "County"
|
5739 |
msgstr ""
|
5740 |
|
8902 |
msgid "Preview email with a donation:"
|
8903 |
msgstr ""
|
8904 |
|
8905 |
+
#: includes/formatting.php:455
|
8906 |
msgid "%s arab"
|
8907 |
msgstr ""
|
8908 |
|
8909 |
+
#: includes/formatting.php:457
|
8910 |
msgid "%s crore"
|
8911 |
msgstr ""
|
8912 |
|
8913 |
+
#: includes/formatting.php:459
|
8914 |
msgid "%s lakh"
|
8915 |
msgstr ""
|
8916 |
|
8917 |
+
#: includes/formatting.php:465
|
8918 |
msgid "%s trillion"
|
8919 |
msgstr ""
|
8920 |
|
8921 |
+
#: includes/formatting.php:467
|
8922 |
msgid "%s billion"
|
8923 |
msgstr ""
|
8924 |
|
8925 |
+
#: includes/formatting.php:469
|
8926 |
msgid "%s million"
|
8927 |
msgstr ""
|
8928 |
|
8929 |
+
#: includes/formatting.php:707
|
8930 |
msgid "Nonce verification has failed."
|
8931 |
msgstr ""
|
8932 |
|
9422 |
msgid "Donor Last Name"
|
9423 |
msgstr ""
|
9424 |
|
9425 |
+
#: includes/import-functions.php:390
|
9426 |
+
msgid "Postal Code"
|
9427 |
+
msgstr ""
|
9428 |
+
|
9429 |
+
#: includes/import-functions.php:392
|
9430 |
msgid "Donor Email"
|
9431 |
msgstr ""
|
9432 |
|
9433 |
+
#: includes/import-functions.php:393, templates/shortcode-receipt.php:62
|
9434 |
msgid "Donation Status"
|
9435 |
msgstr ""
|
9436 |
|
9437 |
+
#: includes/import-functions.php:415
|
9438 |
+
msgid "Donor ID"
|
9439 |
msgstr ""
|
9440 |
|
9441 |
+
#: includes/import-functions.php:434
|
9442 |
+
msgid "Donation Form Title"
|
9443 |
msgstr ""
|
9444 |
|
9445 |
+
#: includes/import-functions.php:435
|
9446 |
msgid "Donation Form ID"
|
9447 |
msgstr ""
|
9448 |
|
9449 |
+
#: includes/import-functions.php:741
|
9450 |
msgid "This donation was imported by %s"
|
9451 |
msgstr ""
|
9452 |
|
9494 |
msgid "Passwords don't match."
|
9495 |
msgstr ""
|
9496 |
|
9497 |
+
#: includes/misc-functions.php:93
|
9498 |
msgid "US Dollars ($)"
|
9499 |
msgstr ""
|
9500 |
|
9501 |
+
#: includes/misc-functions.php:103
|
9502 |
msgid "Euros (€)"
|
9503 |
msgstr ""
|
9504 |
|
9505 |
+
#: includes/misc-functions.php:113
|
9506 |
msgid "Pounds Sterling (£)"
|
9507 |
msgstr ""
|
9508 |
|
9509 |
+
#: includes/misc-functions.php:123
|
9510 |
msgid "Australian Dollars ($)"
|
9511 |
msgstr ""
|
9512 |
|
9513 |
+
#: includes/misc-functions.php:133
|
9514 |
msgid "Brazilian Real (R$)"
|
9515 |
msgstr ""
|
9516 |
|
9517 |
+
#: includes/misc-functions.php:143
|
9518 |
msgid "Canadian Dollars ($)"
|
9519 |
msgstr ""
|
9520 |
|
9521 |
+
#: includes/misc-functions.php:153
|
9522 |
msgid "Czech Koruna (Kč)"
|
9523 |
msgstr ""
|
9524 |
|
9525 |
+
#: includes/misc-functions.php:163
|
9526 |
msgid "Danish Krone (kr.)"
|
9527 |
msgstr ""
|
9528 |
|
9529 |
+
#: includes/misc-functions.php:173
|
9530 |
msgid "Hong Kong Dollar ($)"
|
9531 |
msgstr ""
|
9532 |
|
9533 |
+
#: includes/misc-functions.php:183
|
9534 |
msgid "Hungarian Forint (Ft)"
|
9535 |
msgstr ""
|
9536 |
|
9537 |
+
#: includes/misc-functions.php:193
|
9538 |
msgid "Israeli Shekel (₪)"
|
9539 |
msgstr ""
|
9540 |
|
9541 |
+
#: includes/misc-functions.php:203
|
9542 |
msgid "Japanese Yen (¥)"
|
9543 |
msgstr ""
|
9544 |
|
9545 |
+
#: includes/misc-functions.php:213
|
9546 |
msgid "Malaysian Ringgits (RM)"
|
9547 |
msgstr ""
|
9548 |
|
9549 |
+
#: includes/misc-functions.php:223
|
9550 |
msgid "Mexican Peso ($)"
|
9551 |
msgstr ""
|
9552 |
|
9553 |
+
#: includes/misc-functions.php:233
|
9554 |
msgid "Moroccan Dirham (.د.م)"
|
9555 |
msgstr ""
|
9556 |
|
9557 |
+
#: includes/misc-functions.php:243
|
9558 |
msgid "New Zealand Dollar ($)"
|
9559 |
msgstr ""
|
9560 |
|
9561 |
+
#: includes/misc-functions.php:253
|
9562 |
msgid "Norwegian Krone (Kr.)"
|
9563 |
msgstr ""
|
9564 |
|
9565 |
+
#: includes/misc-functions.php:263
|
9566 |
msgid "Philippine Pesos (₱)"
|
9567 |
msgstr ""
|
9568 |
|
9569 |
+
#: includes/misc-functions.php:273
|
9570 |
msgid "Polish Zloty (zł)"
|
9571 |
msgstr ""
|
9572 |
|
9573 |
+
#: includes/misc-functions.php:283
|
9574 |
msgid "Singapore Dollar ($)"
|
9575 |
msgstr ""
|
9576 |
|
9577 |
+
#: includes/misc-functions.php:293
|
9578 |
msgid "South Korean Won (₩)"
|
9579 |
msgstr ""
|
9580 |
|
9581 |
+
#: includes/misc-functions.php:303
|
9582 |
msgid "South African Rand (R)"
|
9583 |
msgstr ""
|
9584 |
|
9585 |
+
#: includes/misc-functions.php:313
|
9586 |
msgid "Swedish Krona (kr)"
|
9587 |
msgstr ""
|
9588 |
|
9589 |
+
#: includes/misc-functions.php:323
|
9590 |
msgid "Swiss Franc (CHF)"
|
9591 |
msgstr ""
|
9592 |
|
9593 |
+
#: includes/misc-functions.php:333
|
9594 |
msgid "Taiwan New Dollars (NT$)"
|
9595 |
msgstr ""
|
9596 |
|
9597 |
+
#: includes/misc-functions.php:343
|
9598 |
msgid "Thai Baht (฿)"
|
9599 |
msgstr ""
|
9600 |
|
9601 |
+
#: includes/misc-functions.php:353
|
9602 |
msgid "Indian Rupee (₹)"
|
9603 |
msgstr ""
|
9604 |
|
9605 |
+
#: includes/misc-functions.php:363
|
9606 |
msgid "Turkish Lira (₺)"
|
9607 |
msgstr ""
|
9608 |
|
9609 |
+
#: includes/misc-functions.php:373
|
9610 |
msgid "Iranian Rial (﷼)"
|
9611 |
msgstr ""
|
9612 |
|
9613 |
+
#: includes/misc-functions.php:383
|
9614 |
+
msgid "Russian Rubles (руб)"
|
9615 |
msgstr ""
|
9616 |
|
9617 |
+
#: includes/misc-functions.php:760
|
9618 |
msgid "Donation Form ID: %d"
|
9619 |
msgstr ""
|
9620 |
|
9621 |
+
#: includes/misc-functions.php:760
|
9622 |
msgid "Untitled donation form"
|
9623 |
msgstr ""
|
9624 |
|
9625 |
+
#: includes/misc-functions.php:953
|
9626 |
msgid "%1$s is <strong>deprecated</strong> since Give version %2$s! Use %3$s instead."
|
9627 |
msgstr ""
|
9628 |
|
9629 |
+
#: includes/misc-functions.php:957
|
9630 |
msgid "%1$s is <strong>deprecated</strong> since Give version %2$s with no alternative available."
|
9631 |
msgstr ""
|
9632 |
|
9633 |
+
#: includes/misc-functions.php:1032
|
9634 |
msgid "Be sure to sign up for the Give newsletter below to stay informed of important updates and news."
|
9635 |
msgstr ""
|
9636 |
|
9637 |
+
#: includes/misc-functions.php:1040
|
9638 |
msgid "Thanks for Subscribing!"
|
9639 |
msgstr ""
|
9640 |
|
9641 |
+
#: includes/misc-functions.php:1047, includes/misc-functions.php:1049
|
9642 |
msgid "Email Address (required)"
|
9643 |
msgstr ""
|
9644 |
|
9645 |
+
#: includes/misc-functions.php:1066
|
9646 |
msgid "Subscribe"
|
9647 |
msgstr ""
|
9648 |
|
9649 |
+
#: includes/misc-functions.php:1145, includes/post-types.php:41
|
9650 |
msgid "Donation Forms"
|
9651 |
msgstr ""
|
9652 |
|
9653 |
+
#: includes/misc-functions.php:1238
|
9654 |
msgid "array_column() expects at least 2 parameters, %s given."
|
9655 |
msgstr ""
|
9656 |
|
9657 |
+
#: includes/misc-functions.php:1244
|
9658 |
msgid "array_column() expects parameter 1 to be array, %s given."
|
9659 |
msgstr ""
|
9660 |
|
9661 |
+
#: includes/misc-functions.php:1255
|
9662 |
msgid "array_column(): The column key should be either a string or an integer."
|
9663 |
msgstr ""
|
9664 |
|
9665 |
+
#: includes/misc-functions.php:1266
|
9666 |
msgid "array_column(): The index key should be either a string or an integer."
|
9667 |
msgstr ""
|
9668 |
|
9670 |
msgid "Status changed from %1$s to %2$s."
|
9671 |
msgstr ""
|
9672 |
|
9673 |
+
#: includes/payments/functions.php:670
|
9674 |
msgid "Complete"
|
9675 |
msgstr ""
|
9676 |
|
9677 |
+
#: includes/payments/functions.php:675
|
9678 |
msgid "Pre-Approved"
|
9679 |
msgstr ""
|
9680 |
|
9681 |
+
#: includes/payments/functions.php:1630
|
9682 |
msgid "Delete this donation note."
|
9683 |
msgstr ""
|
9684 |
|
9685 |
+
#: includes/payments/functions.php:1935
|
9686 |
msgctxt "custom donation dropdown item"
|
9687 |
msgid "Custom"
|
9688 |
msgstr ""
|
9699 |
msgid "Edit Donation Form"
|
9700 |
msgstr ""
|
9701 |
|
|
|
|
|
|
|
|
|
9702 |
#: includes/post-types.php:49
|
9703 |
msgid "Search Forms"
|
9704 |
msgstr ""
|
10173 |
msgid "Changes you made may not be saved."
|
10174 |
msgstr ""
|
10175 |
|
10176 |
+
#: includes/shortcodes.php:47
|
10177 |
msgid "Return to All Donations"
|
10178 |
msgstr ""
|
10179 |
|
10180 |
+
#: includes/shortcodes.php:78
|
10181 |
msgid "You must be logged in to view your donation history. Please login using your account or create an account using the same email you used to donate with."
|
10182 |
msgstr ""
|
10183 |
|
10184 |
+
#: includes/shortcodes.php:147
|
10185 |
msgid "The shortcode is missing Donation Form ID attribute."
|
10186 |
msgstr ""
|
10187 |
|
10188 |
+
#: includes/shortcodes.php:153
|
10189 |
msgid "The form does not have Goals enabled."
|
10190 |
msgstr ""
|
10191 |
|
10192 |
+
#: includes/shortcodes.php:237
|
10193 |
msgid "You are missing the payment key to view this donation receipt."
|
10194 |
msgstr ""
|
10195 |
|
10196 |
+
#: includes/shortcodes.php:297
|
10197 |
msgid "You must be logged in to view this donation receipt."
|
10198 |
msgstr ""
|
10199 |
|
10200 |
+
#: includes/shortcodes.php:352
|
10201 |
msgid "Your Donor and User profile are no longer connected. Please contact the site administrator."
|
10202 |
msgstr ""
|
10203 |
|
10204 |
+
#: includes/shortcodes.php:434
|
10205 |
msgid "The email you entered is empty."
|
10206 |
msgstr ""
|
10207 |
|
10208 |
+
#: includes/shortcodes.php:438
|
10209 |
msgid "The email you entered is not valid. Please use another"
|
10210 |
msgstr ""
|
10211 |
|
10212 |
+
#: includes/shortcodes.php:443
|
10213 |
msgid "The email you entered belongs to another user. Please use another."
|
10214 |
msgstr ""
|
10215 |
|
10321 |
msgid "An email with an access link has been sent to %s."
|
10322 |
msgstr ""
|
10323 |
|
10324 |
+
#: templates/history-donations.php:166
|
10325 |
msgid "View"
|
10326 |
msgstr ""
|
10327 |
|
10328 |
+
#: templates/history-donations.php:179
|
10329 |
msgid "View Receipt »"
|
10330 |
msgstr ""
|
10331 |
|
10332 |
+
#: templates/history-donations.php:214
|
10333 |
msgid "It looks like you haven't made any donations."
|
10334 |
msgstr ""
|
10335 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: donation, donations, donation plugin, wordpress donation plugin, wp donati
|
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.8
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 1.8.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -208,6 +208,13 @@ Use Give for donations, and let WooCommerce or WP eCommerce or the like handle y
|
|
208 |
|
209 |
== Changelog ==
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
= 1.8.14: October 13th, 2017 =
|
212 |
* New: Integrated with Akismet for improved spam filtering [#673](https://github.com/WordImpress/Give/issues/673)
|
213 |
* New: The "Tools > Import" now lists available import options. This makes room for settings and form export/import coming soon! [#2114](https://github.com/WordImpress/Give/issues/2114)
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.8
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 1.8.15
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
208 |
|
209 |
== Changelog ==
|
210 |
|
211 |
+
= 1.8.15: October 18th, 2017 =
|
212 |
+
* New: Added support for dynamic currencies. [#2197](https://github.com/WordImpress/Give/issues/2197)
|
213 |
+
* Fix: The importer should map "Postal Code" and "Zip" to the single field. [#2164](https://github.com/WordImpress/Give/issues/2164)
|
214 |
+
* Fix: Renamed importer field "Donation Form" to proper naming "Donation Form Title". [#2165](https://github.com/WordImpress/Give/issues/2165)
|
215 |
+
* Fix: Issue with give_validate_license_when_site_migrated() causing sites to have excessive $_POST requests to the licensing server.
|
216 |
+
* Fix: Improved the Tools > Data confirmation checkbox and submit button functionality to prevent excessive clicks. [#2195](https://github.com/WordImpress/Give/issues/2195)
|
217 |
+
|
218 |
= 1.8.14: October 13th, 2017 =
|
219 |
* New: Integrated with Akismet for improved spam filtering [#673](https://github.com/WordImpress/Give/issues/673)
|
220 |
* New: The "Tools > Import" now lists available import options. This makes room for settings and form export/import coming soon! [#2114](https://github.com/WordImpress/Give/issues/2114)
|
templates/history-donations.php
CHANGED
@@ -3,6 +3,10 @@
|
|
3 |
* This template is used to display the donation history of the current user.
|
4 |
*/
|
5 |
|
|
|
|
|
|
|
|
|
6 |
// User's Donations.
|
7 |
if ( is_user_logged_in() ) {
|
8 |
$donations = give_get_users_donations( get_current_user_id(), 20, true, 'any' );
|
@@ -15,35 +19,52 @@ if ( is_user_logged_in() ) {
|
|
15 |
$donations = give_get_users_donations( $email, 20, true, 'any' );
|
16 |
}
|
17 |
|
|
|
18 |
if ( $donations ) : ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
<table id="give_user_history" class="give-table">
|
20 |
<thead>
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
</thead>
|
48 |
<?php foreach ( $donations as $post ) :
|
49 |
setup_postdata( $post );
|
@@ -61,46 +82,105 @@ if ( $donations ) : ?>
|
|
61 |
* @param mixed $donation_data Payment meta data.
|
62 |
*/
|
63 |
do_action( 'give_donation_history_row_start', $post->ID, $donation_data );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
?>
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
);
|
|
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
*
|
87 |
-
* @return int
|
88 |
-
*/
|
89 |
-
echo apply_filters( 'give_donation_history_row_amount', $donation_amount, $post->ID );
|
90 |
-
?>
|
91 |
-
</span>
|
92 |
-
</td>
|
93 |
<td class="give-donation-details">
|
94 |
<?php
|
95 |
// Display View Receipt or.
|
96 |
-
if ( 'publish' !== $post->post_status
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
</td>
|
105 |
<?php
|
106 |
/**
|
@@ -131,5 +211,5 @@ if ( $donations ) : ?>
|
|
131 |
</div>
|
132 |
<?php wp_reset_postdata(); ?>
|
133 |
<?php else : ?>
|
134 |
-
<?php Give()->notices->print_frontend_notice(
|
135 |
<?php endif;
|
3 |
* This template is used to display the donation history of the current user.
|
4 |
*/
|
5 |
|
6 |
+
$donation_history_args = Give()->session->get( 'give_donation_history_args' );
|
7 |
+
|
8 |
+
$donations = array();
|
9 |
+
|
10 |
// User's Donations.
|
11 |
if ( is_user_logged_in() ) {
|
12 |
$donations = give_get_users_donations( get_current_user_id(), 20, true, 'any' );
|
19 |
$donations = give_get_users_donations( $email, 20, true, 'any' );
|
20 |
}
|
21 |
|
22 |
+
|
23 |
if ( $donations ) : ?>
|
24 |
+
<?php
|
25 |
+
$table_headings = array(
|
26 |
+
'id' => __( 'ID', 'give' ),
|
27 |
+
'date' => __( 'Date', 'give' ),
|
28 |
+
'donor' => __( 'Donor', 'give' ),
|
29 |
+
'amount' => __( 'Amount', 'give' ),
|
30 |
+
'status' => __( 'Status', 'give' ),
|
31 |
+
'payment_method' => __( 'Payment Method', 'give' ),
|
32 |
+
'details' => __( 'Details', 'give' ),
|
33 |
+
);
|
34 |
+
?>
|
35 |
<table id="give_user_history" class="give-table">
|
36 |
<thead>
|
37 |
+
<tr class="give-donation-row">
|
38 |
+
<?php
|
39 |
+
/**
|
40 |
+
* Fires in current user donation history table, before the header row start.
|
41 |
+
*
|
42 |
+
* Allows you to add new <th> elements to the header, before other headers in the row.
|
43 |
+
*
|
44 |
+
* @since 1.7
|
45 |
+
*/
|
46 |
+
do_action( 'give_donation_history_header_before' );
|
47 |
+
|
48 |
+
foreach ( $donation_history_args as $index => $value ) {
|
49 |
+
if ( filter_var( $donation_history_args[ $index ], FILTER_VALIDATE_BOOLEAN ) ) :
|
50 |
+
echo sprintf(
|
51 |
+
'<th scope="col" class="give-donation-%1$s>">%2$s</th>',
|
52 |
+
$index,
|
53 |
+
$table_headings[ $index ]
|
54 |
+
);
|
55 |
+
endif;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Fires in current user donation history table, after the header row ends.
|
60 |
+
*
|
61 |
+
* Allows you to add new <th> elements to the header, after other headers in the row.
|
62 |
+
*
|
63 |
+
* @since 1.7
|
64 |
+
*/
|
65 |
+
do_action( 'give_donation_history_header_after' );
|
66 |
+
?>
|
67 |
+
</tr>
|
68 |
</thead>
|
69 |
<?php foreach ( $donations as $post ) :
|
70 |
setup_postdata( $post );
|
82 |
* @param mixed $donation_data Payment meta data.
|
83 |
*/
|
84 |
do_action( 'give_donation_history_row_start', $post->ID, $donation_data );
|
85 |
+
|
86 |
+
if ( filter_var( $donation_history_args['id'], FILTER_VALIDATE_BOOLEAN ) ) :
|
87 |
+
echo sprintf(
|
88 |
+
'<td class="give-donation-id">#%s</td>',
|
89 |
+
give_get_payment_number( $post->ID )
|
90 |
+
);
|
91 |
+
endif;
|
92 |
+
|
93 |
+
if ( filter_var( $donation_history_args['date'], FILTER_VALIDATE_BOOLEAN ) ) :
|
94 |
+
echo sprintf(
|
95 |
+
'<td class="give-donation-date">#%s</td>',
|
96 |
+
date_i18n( give_date_format(), strtotime( get_post_field( 'post_date', $post->ID ) ) )
|
97 |
+
);
|
98 |
+
endif;
|
99 |
+
|
100 |
+
if ( filter_var( $donation_history_args['donor'], FILTER_VALIDATE_BOOLEAN ) ) :
|
101 |
+
echo sprintf(
|
102 |
+
'<td class="give-donation-donor">#%s</td>',
|
103 |
+
give_get_donor_name_by( $post->ID )
|
104 |
+
);
|
105 |
+
endif;
|
106 |
?>
|
107 |
+
|
108 |
+
<?php if ( filter_var( $donation_history_args['amount'], FILTER_VALIDATE_BOOLEAN ) ) : ?>
|
109 |
+
<td class="give-donation-amount">
|
110 |
+
<span class="give-donation-amount">
|
111 |
+
<?php
|
112 |
+
$currency_code = give_get_payment_currency_code( $post->ID );
|
113 |
+
$donation_amount = give_currency_filter(
|
114 |
+
give_format_amount( give_get_payment_amount( $post->ID ), array(
|
115 |
+
'sanitize' => false,
|
116 |
+
'currency' => $currency_code,
|
117 |
+
)),
|
118 |
+
$currency_code
|
119 |
+
);
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Filters the donation amount on Donation History Page.
|
123 |
+
*
|
124 |
+
* @param int $donation_amount Donation Amount.
|
125 |
+
* @param int $post_id Donation ID.
|
126 |
+
*
|
127 |
+
* @since 1.8.13
|
128 |
+
*
|
129 |
+
* @return int
|
130 |
+
*/
|
131 |
+
echo apply_filters( 'give_donation_history_row_amount', $donation_amount, $post->ID );
|
132 |
+
?>
|
133 |
+
</span>
|
134 |
+
</td>
|
135 |
+
<?php endif; ?>
|
136 |
+
|
137 |
+
<?php
|
138 |
+
if ( filter_var( $donation_history_args['status'], FILTER_VALIDATE_BOOLEAN ) ) :
|
139 |
+
echo sprintf(
|
140 |
+
'<td class="give-donation-status">#%s</td>',
|
141 |
+
give_get_payment_status( $post, true )
|
142 |
);
|
143 |
+
endif;
|
144 |
|
145 |
+
if ( filter_var( $donation_history_args['payment_method'], FILTER_VALIDATE_BOOLEAN ) ) :
|
146 |
+
echo sprintf(
|
147 |
+
'<td class="give-donation-payment-method">#%s</td>',
|
148 |
+
give_get_gateway_checkout_label( give_get_payment_gateway( $post->ID ) )
|
149 |
+
);
|
150 |
+
endif;
|
151 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
<td class="give-donation-details">
|
153 |
<?php
|
154 |
// Display View Receipt or.
|
155 |
+
if ( 'publish' !== $post->post_status && 'subscription' !== $post->post_status ) :
|
156 |
+
echo sprintf(
|
157 |
+
'<a href="%1$s"><span class="give-donation-status %2$s">%3$s</span></a>',
|
158 |
+
esc_url(
|
159 |
+
add_query_arg(
|
160 |
+
'payment_key',
|
161 |
+
give_get_payment_key( $post->ID ),
|
162 |
+
give_get_history_page_uri()
|
163 |
+
)
|
164 |
+
),
|
165 |
+
$post->post_status,
|
166 |
+
__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' »'
|
167 |
+
);
|
168 |
+
|
169 |
+
else :
|
170 |
+
echo sprintf(
|
171 |
+
'<a href="%1$s">%2$s</a>',
|
172 |
+
esc_url(
|
173 |
+
add_query_arg(
|
174 |
+
'payment_key',
|
175 |
+
give_get_payment_key( $post->ID ),
|
176 |
+
give_get_history_page_uri()
|
177 |
+
)
|
178 |
+
),
|
179 |
+
__( 'View Receipt »', 'give' )
|
180 |
+
);
|
181 |
+
|
182 |
+
endif;
|
183 |
+
?>
|
184 |
</td>
|
185 |
<?php
|
186 |
/**
|
211 |
</div>
|
212 |
<?php wp_reset_postdata(); ?>
|
213 |
<?php else : ?>
|
214 |
+
<?php Give()->notices->print_frontend_notice( __( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?>
|
215 |
<?php endif;
|