Version Description
Download this release
Release Info
Developer | mordauk |
Plugin | Easy Digital Downloads |
Version | 2.6.6 |
Comparing to | |
See all releases |
Code changes from version 2.6.5 to 2.6.6
- assets/js/admin-scripts.js +15 -1
- assets/js/admin-scripts.min.js +2 -2
- easy-digital-downloads.php +3 -3
- includes/admin/customers/customer-actions.php +1 -1
- includes/admin/payments/view-order-details.php +17 -7
- includes/cart/functions.php +9 -3
- includes/class-edd-html-elements.php +1 -0
- includes/class-edd-register-meta.php +4 -4
- includes/discount-functions.php +38 -18
- includes/process-download.php +4 -4
- includes/scripts.php +36 -33
- includes/shortcodes.php +18 -7
- includes/tax-functions.php +2 -0
- languages/easy-digital-downloads-af.mo +0 -0
- languages/easy-digital-downloads-de_DE.mo +0 -0
- languages/easy-digital-downloads-en_AU.mo +0 -0
- languages/easy-digital-downloads-en_CA.mo +0 -0
- languages/easy-digital-downloads-en_GB.mo +0 -0
- languages/easy-digital-downloads-en_NZ.mo +0 -0
- languages/easy-digital-downloads-es_ES.mo +0 -0
- languages/easy-digital-downloads-fr_FR.mo +0 -0
- languages/easy-digital-downloads-it_IT.mo +0 -0
- languages/easy-digital-downloads-nl_NL.mo +0 -0
- languages/easy-digital-downloads-pt_PT.mo +0 -0
- languages/easy-digital-downloads.pot +60 -48
- readme.txt +10 -29
assets/js/admin-scripts.js
CHANGED
@@ -1156,7 +1156,21 @@ jQuery(document).ready(function ($) {
|
|
1156 |
placeholder_text_multiple: edd_vars.one_or_more_option,
|
1157 |
});
|
1158 |
|
1159 |
-
$('.edd-select-chosen .chosen-search input'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1160 |
|
1161 |
// Add placeholders for Chosen input fields
|
1162 |
$( '.chosen-choices' ).on( 'click', function () {
|
1156 |
placeholder_text_multiple: edd_vars.one_or_more_option,
|
1157 |
});
|
1158 |
|
1159 |
+
$('.edd-select-chosen .chosen-search input').each( function() {
|
1160 |
+
var type = $(this).parent().parent().parent().prev('select.edd-select-chosen').data('search-type');
|
1161 |
+
var placeholder = '';
|
1162 |
+
|
1163 |
+
if ( type === 'download' ) {
|
1164 |
+
placeholder = edd_vars.search_placeholder;
|
1165 |
+
} else {
|
1166 |
+
var type = 'search_placeholder_' + type;
|
1167 |
+
if ( edd_vars[type] ) {
|
1168 |
+
placeholder = edd_vars[type];
|
1169 |
+
}
|
1170 |
+
}
|
1171 |
+
|
1172 |
+
$(this).attr( 'placeholder', placeholder );
|
1173 |
+
});
|
1174 |
|
1175 |
// Add placeholders for Chosen input fields
|
1176 |
$( '.chosen-choices' ).on( 'click', function () {
|
assets/js/admin-scripts.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
jQuery(document).ready(function(e){e(".edd-help-tip").tooltip({content:function(){return e(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}});var t={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(t){var d=highest=1;return t.parent().find("tr.edd_repeatable_row").each(function(){var t=e(this).data("key");parseInt(t)>highest&&(highest=t)}),d=highest+=1,clone=t.clone(),clone.find("select").each(function(){e(this).val(t.find('select[name="'+e(this).attr("name")+'"]').val())}),clone.removeClass("edd_add_blank"),clone.attr("data-key",d),clone.find("td input, td select, textarea").val(""),clone.find("input, select, textarea").each(function(){var t=e(this).attr("name"),n=e(this).attr("id");t&&(t=t.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),e(this).attr("name",t)),"undefined"!=typeof n&&(n=n.replace(/(\d+)/,parseInt(d)),e(this).attr("id",n))}),clone.find("span.edd_price_id").each(function(){e(this).text(parseInt(d))}),clone.find("span.edd_file_id").each(function(){e(this).text(parseInt(d))}),clone.find(".edd_repeatable_default_input").each(function(){e(this).val(parseInt(d)).removeAttr("checked")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),clone},add:function(){e(document.body).on("click",".submit .edd_add_repeatable",function(d){d.preventDefault();var n=e(this),a=n.parent().parent().prev("tr"),i=t.clone_repeatable(a);i.insertAfter(a).find("input, textarea, select").filter(":visible").eq(0).focus(),i.find(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),i.find(".edd-select-chosen").css("width","100%"),i.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder)})},move:function(){e(".edd_repeatable_table tbody").sortable({handle:".edd_draghandle",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var t=0;e(this).find("tr").each(function(){e(this).find("input.edd_repeatable_index").each(function(){e(this).val(t)}),t++})}})},remove:function(){e(document.body).on("click",".edd_remove_repeatable",function(t){t.preventDefault();var d,n,a,i=e(this).parent().parent("tr"),o=i.parent().find("tr").length-1,r=e(this).data("type"),s="tr.edd_repeatable_"+r+"s";if(d=e(this).is(".ui-sortable tr:first-child .edd_remove_repeatable:first-child")?i.next("tr"):i.prev("tr"),n=d.find("select, input, textarea, button").filter(":visible"),a=n.eq(0),"price"===r){var c=i.data("key");e('.edd_repeatable_condition_field option[value="'+c+'"]').remove()}if(o>1)e("input, select",i).val(""),i.fadeOut("fast").remove(),a.focus();else switch(r){case"price":alert(edd_vars.one_price_min);break;case"file":e("input, select",i).val("");break;default:alert(edd_vars.one_field_min)}e(s).each(function(t){e(this).find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+t+"]"),e(this).attr("name",d).attr("id",d)})})})},type:function(){e(document.body).on("change","#_edd_product_type",function(t){var d=e("#edd_products"),n=e("#edd_download_files"),a=e("#edd_download_limit_wrap");"bundle"===e(this).val()?(d.show(),n.hide(),a.hide()):(d.hide(),n.show(),a.show())})},prices:function(){e(document.body).on("change","#edd_variable_pricing",function(t){e(".edd_pricing_fields,.edd_repeatable_table .pricing").toggle()})},files:function(){if("undefined"==typeof wp||"1"!==edd_vars.new_media_ui)e(".edd_upload_file_button").length>0&&(window.formfield="",e(document.body).on("click",".edd_upload_file_button",function(t){if(t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),null!=edd_vars.post_id)var d="post_id="+edd_vars.post_id+"&";tb_show(edd_vars.add_new_download,"media-upload.php?"+d+"TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1});else{var d;window.formfield="",e(document.body).on("click",".edd_upload_file_button",function(n){n.preventDefault();var a=e(this);return window.formfield=e(this).closest(".edd_repeatable_upload_wrapper"),d?void d.open():(d=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:a.data("uploader-title"),button:{text:a.data("uploader-button-text")},multiple:"0"==e(this).data("multiple")?!1:!0}),d.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),d.on("insert",function(){var e=d.state().get("selection");e.each(function(e,d){if(e=e.toJSON(),0===d)window.formfield.find(".edd_repeatable_attachment_id_field").val(e.id),window.formfield.find(".edd_repeatable_upload_field").val(e.url),window.formfield.find(".edd_repeatable_name_field").val(e.title);else{var n=window.formfield,a=t.clone_repeatable(n);a.find(".edd_repeatable_attachment_id_field").val(e.id),a.find(".edd_repeatable_upload_field").val(e.url),e.title.length>0?a.find(".edd_repeatable_name_field").val(e.title):a.find(".edd_repeatable_name_field").val(e.filename),a.insertAfter(n)}})}),void d.open())});var d;window.formfield=""}},updatePrices:function(){e("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var t=e(this).parents("tr").data("key"),d=e(this).val(),n=e(".edd_repeatable_condition_field option[value="+t+"]");n.length>0?n.text(d):e(".edd_repeatable_condition_field").append(e("<option></option>").attr("value",t).text(d))})}};t.init();var d=e(".edd_datepicker");if(d.length>0){var n="mm/dd/yy";d.datepicker({dateFormat:n})}var a={init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.new_customer(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){e('select[name="edd-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"edd-payment-address[0][state]"},e.post(ajaxurl,data,function(t){var d=e("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");"nostates"==t?d.replaceWith('<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>'):d.replaceWith(t)}),!1})},remove_download:function(){e("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var t=e(document.body).find("#edd-purchased-files > .row").length;if(1===t)return alert(edd_vars.one_download_min),!1;if(confirm(edd_vars.delete_payment_download)){var d=e(this).data("key"),n=(e(".edd-payment-id").val(),e('input[name="edd-payment-details-downloads['+d+'][id]"]').val()),a=e('input[name="edd-payment-details-downloads['+d+'][price_id]"]').val(),i=e('input[name="edd-payment-details-downloads['+d+'][quantity]"]').val(),o=e('input[name="edd-payment-details-downloads['+d+'][amount]"]').val(),r=e('input[name="edd-payment-removed"]').val();r=e.parseJSON(r),r.length<1&&(r={});var s=[{id:n,price_id:a,quantity:i,amount:o,cart_index:d}];r[d]=s,e('input[name="edd-payment-removed"]').val(JSON.stringify(r)),e(this).parent().parent().parent().remove(),e("#edd-payment-downloads-changed").val(1),e(".edd-order-payment-recalc-totals").show()}return!1})},new_customer:function(){e("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(t){t.preventDefault(),e(".customer-info").toggle(),e(".new-customer").toggle();var d=e("#edd-new-customer");e(".new-customer").is(":visible")?d.val(1):d.val(0)})},add_download:function(){e("#edd-purchased-files").on("click","#edd-order-add-download",function(t){t.preventDefault();var d=e("#edd_order_download_select"),n=e("#edd-order-download-quantity"),a=e("#edd-order-download-amount"),i=e(".edd_price_options_select option:selected"),o=d.val(),r=d.find(":selected").text(),s=n.val(),c=a.val(),l=i.val(),u=i.text();if(1>o)return!1;if(c||(c=0),c=parseFloat(c),isNaN(c))return alert(edd_vars.numeric_item_price),!1;var p=c;if("1"===edd_vars.quantities_enabled){if(isNaN(parseInt(s)))return alert(edd_vars.numeric_quantity),!1;c*=s}c=c.toFixed(edd_vars.currency_decimals);var _=c+edd_vars.currency_sign;"before"===edd_vars.currency_pos&&(_=edd_vars.currency_sign+c),u&&(r=r+" - "+u);var f=e("#edd-purchased-files div.row").length,m=e("#edd-purchased-files div.row:last").clone();m.find(".download span").html('<a href="post.php?post='+o+'&action=edit"></a>'),m.find(".download span a").text(r),m.find(".price-text").text(_),m.find(".item-quantity").text(s),m.find(".item-price").text(edd_vars.currency_sign+(c/s).toFixed(edd_vars.currency_decimals)),m.find("input.edd-payment-details-download-id").val(o),m.find("input.edd-payment-details-download-price-id").val(l),m.find("input.edd-payment-details-download-item-price").val(p),m.find("input.edd-payment-details-download-amount").val(c),m.find("input.edd-payment-details-download-quantity").val(s),m.find("input.edd-payment-details-download-has-log").val(0),m.find("input").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(f)+"]"),e(this).attr("name",t).attr("id",t)}),e("#edd-payment-downloads-changed").val(1),e(m).insertAfter("#edd-purchased-files div.row:last"),e(".edd-order-payment-recalc-totals").show()})},recalculate_total:function(){e("#edd-order-recalc-total").on("click",function(t){t.preventDefault();var d=0,n=e("#edd-purchased-files .row .edd-payment-details-download-amount");n.length&&n.each(function(){d+=parseFloat(e(this).val())}),e(".edd-payment-fees").length&&e(".edd-payment-fees span.fee-amount").each(function(){d+=parseFloat(e(this).data("fee"))}),e("input[name=edd-payment-total]").val(d.toFixed(edd_vars.currency_decimals))})},variable_prices_check:function(){e("#edd-purchased-files").on("change","select#edd_order_download_select",function(){var t=e(this),d=t.val();if(parseInt(d)>0){var n={action:"edd_check_for_download_price_variations",download_id:d};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(d){e(".edd_price_options_select").remove(),e(d).insertAfter(t.next())}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}})},add_note:function(){e("#edd-add-payment-note").on("click",function(t){t.preventDefault();var d={action:"edd_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#edd-payment-note").val()};if(d.note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-payment-notes-inner").append(t),e(".edd-no-payment-notes").hide(),e("#edd-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#edd-payment-note").css("border-color");e("#edd-payment-note").css("border-color","red"),setTimeout(function(){e("#edd-payment-note").css("border-color",n)},500)}})},remove_note:function(){e(document.body).on("click",".edd-delete-payment-note",function(t){if(t.preventDefault(),confirm(edd_vars.delete_payment_note)){var d={action:"edd_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){return e("#edd-payment-note-"+d.note_id).remove(),e(".edd-payment-note").length||e(".edd-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},resend_receipt:function(){e(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){e(document.body).on("click",".edd-copy-download-link",function(t){t.preventDefault();var d=e(this),n={action:"edd_get_file_download_link",payment_id:e('input[name="edd_payment_id"]').val(),download_id:d.data("download-id"),price_id:d.data("price-id")};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(t){return e("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+t+"</textarea>"),e("#edd-download-link-textarea").focus().select(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)})})}};a.init();var i={init:function(){this.type_select(),this.product_requirements()},type_select:function(){e("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){e(".edd-amount-description").toggle()})},product_requirements:function(){e("#products").change(function(){var t=e("#edd-discount-product-conditions");e(this).val()?t.show():t.hide()})}};i.init();var o={init:function(){this.date_options(),this.customers_export()},date_options:function(){e("#edd-graphs-date-options").change(function(){var t=e(this),d=e("#edd-date-range-options");"other"===t.val()?d.show():d.hide()})},customers_export:function(){e("#edd_customer_export_download").change(function(){var t=e(this),d=e("option:selected",t).val(),n=e("#edd_customer_export_option");if("0"===t.val()?n.show():n.hide(),0!=parseInt(d)){var a={action:"edd_check_for_download_price_variations",download_id:d,all_prices:!0},i=e(".edd_price_options_select");e.post(ajaxurl,a,function(t){i.remove(),e("#edd_customer_export_download_chosen").after(t)})}else i.remove()})}};o.init();var r={init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var t=e(".edd-color-picker");if(t.length&&t.wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui){var d=e(".edd_settings_upload_button");d.length>0&&(window.formfield="",e(document.body).on("click",d,function(t){t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1})}else{var n;window.formfield="",e(document.body).on("click",".edd_settings_upload_button",function(t){t.preventDefault();var d=e(this);return window.formfield=e(this).parent().prev(),n?void n.open():(n=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:d.data("uploader_title"),button:{text:d.data("uploader_button_text")},multiple:!1}),n.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),n.on("insert",function(){var e=n.state().get("selection");e.each(function(e,t){e=e.toJSON(),window.formfield.val(e.url)})}),void n.open())});var n;window.formfield=""}},taxes:function(){var t=e("select.edd-no-states");t.length&&t.closest("tr").hide(),e('select[name="edd_settings[base_country]"]').change(function(){var t=e(this),d=t.closest("tr");return data={action:"edd_get_shop_states",country:e(this).val(),field_name:"edd_settings[base_state]"},e.post(ajaxurl,data,function(e){"nostates"==e?d.next().hide():(d.next().show(),d.next().find("select").replaceWith(e))}),!1}),e(document.body).on("change","#edd_tax_rates select.edd-tax-country",function(){var t=e(this);return data={action:"edd_get_shop_states",country:e(this).val(),field_name:t.attr("name").replace("country","state")},e.post(ajaxurl,data,function(e){if("nostates"==e){var d='<input type="text" name="'+data.field_name+'" value=""/>';t.parent().next().find("select").replaceWith(d)}else t.parent().next().find("input,select").show(),t.parent().next().find("input,select").replaceWith(e)}),!1}),e("#edd_add_tax_rate").on("click",function(){var t=e("#edd_tax_rates tr:last"),d=t.clone(),n=t.parent().find("tr").length;return d.find("td input").not(":input[type=checkbox]").val(""),d.find('td [type="checkbox"]').attr("checked",!1),d.find("input, select").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(n)+"]"),e(this).attr("name",t).attr("id",t)}),d.find("label").each(function(){var t=e(this).attr("for");t=t.replace(/\[(\d+)\]/,"["+parseInt(n)+"]"),e(this).attr("for",t)}),d.insertAfter(t),!1}),e(document.body).on("click","#edd_tax_rates .edd_remove_tax_rate",function(){if(confirm(edd_vars.delete_tax_rate)){var t=e("#edd_tax_rates tr:visible"),d=t.length;2===d?(e("#edd_tax_rates select").val(""),e('#edd_tax_rates input[type="text"]').val(""),e('#edd_tax_rates input[type="number"]').val(""),e('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):e(this).closest("tr").remove(),e("#edd_tax_rates tr").each(function(t){e(this).children().find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+(t-1)+"]"),e(this).attr("name",d).attr("id",d)})})}return!1})},emails:function(){var t=e("#email-preview-wrap");if(t.length){var d=e("#email-preview");t.colorbox({inline:!0,href:d,width:"80%",height:"auto"})}},misc:function(){var t=e('select[name="edd_settings[download_method]"]'),d=t.parent().parent().next();"direct"==t.val()&&(d.hide(),d.find("input").prop("checked",!1)),t.on("change",function(){"direct"==e(this).val()?(d.hide(),d.find("input").prop("checked",!1)):d.show()})}};r.init(),e(".download_page_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return confirm(edd_vars.delete_payment)?!0:!1}),e("#the-list").on("click",".editinline",function(){var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var d=e("#post-"+t),n=d.find(".column-price .downloadprice-"+t).val();n!=e("#post-"+t+".column-price .downloadprice-"+t).val()?e(".regprice","#edd-download-data").val(n).attr("disabled",!1):e(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),e(document.body).on("click","#bulk_edit",function(){var t=e("#bulk-edit"),d=new Array;t.find("#bulk-titles").children().each(function(){d.push(e(this).attr("id").replace(/^(ttle)/i,""))});var n=e('#edd-download-data input[name="_edd_regprice"]').val(),a={action:"edd_save_bulk_edit",edd_bulk_nonce:d,post_ids:d,price:n};e.post(ajaxurl,a)}),e(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),e(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder),e(".chosen-choices").on("click",function(){e(this).children("li").children("input").attr("placeholder",edd_vars.type_to_search)});var s,c=342;e(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(t){var d=e(this).val(),n=e(this).closest(".edd-select-chosen"),a=n.attr("id").replace("_chosen",""),i=n.hasClass("no-bundles"),o=t.which,r="edd_download_search";n.prev().data("search-type")&&(r="edd_"+n.prev().data("search-type")+"_search"),d.length<=3&&"edd_download_search"==r||16==o||13==o||91==o||17==o||37==o||38==o||39==o||40==o||(clearTimeout(s),s=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:r,s:d,no_bundles:i},dataType:"json",beforeSend:function(){e("ul.chosen-results").empty()},success:function(t){e("#"+a+" option:not(:selected)").remove(),e.each(t,function(t,d){e("#"+a+' option[value="'+d.id+'"]').length||e("#"+a).prepend('<option value="'+d.id+'">'+d.name+"</option>")}),e(".edd-select-chosen").trigger("chosen:updated"),e("#"+a).next().find("input").val(d)}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){})},c))}),e("#post").on("click",".edd-thickbox",function(){e(".edd-select-chosen","#choose-download").css("width","100%")});var l={init:function(){this.revoke_api_key(),this.regenerate_api_key(),this.create_api_key(),this.recount_stats()},revoke_api_key:function(){e(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){e(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd_vars.regenerate_api_key)})},create_api_key:function(){e(document.body).on("submit","#api-key-generate-form",function(t){var d=e('input[type="text"][name="user_id"]');d.css("border-color","#ddd");var n=d.val();return n.length<1||0==n?(d.css("border-color","#ff0000"),!1):void 0})},recount_stats:function(){e("body").on("change","#recount-stats-type",function(){var t=e("#edd-tools-recount-form"),d=e("option:selected",this).data("type"),n=e("#recount-stats-submit"),a=e("#tools-product-dropdown");if(t.find(".notice-wrap").remove(),n.removeClass("button-disabled").attr("disabled",!1),a.hide(),e(".edd-recount-stats-descriptions span").hide(),"recount-download"===d)a.show(),a.find(".edd-select-chosen").css("width","auto");else if("reset-stats"===d){t.append('<div class="notice-wrap"></div>');var i=t.find(".notice-wrap");i.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+edd_vars.reset_stats_warn+"</label></p></div>"),e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}else a.hide(),a.val(0);e("#"+d).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("#edd-tools-recount-form").submit(function(t){var d=e("#recount-stats-type").val(),n=e(this),a=e("option:selected",this).data("type");if("reset-stats"===a){var i=e("#confirm-reset").is(":checked");if(i)return!0;r=!0}n.find(".notice-wrap").remove(),n.append('<div class="notice-wrap"></div>');var o=n.find(".notice-wrap"),r=!1;if((null===d||0===d)&&(o.html('<div class="updated error"><p>'+edd_vars.batch_export_no_class+"</p></div>"),r=!0),"recount-download"===a){var s=e('select[name="download_id"]').val();0==s&&(o.html('<div class="updated error"><p>'+edd_vars.batch_export_no_reqs+"</p></div>"),r=!0)}return r?(n.find(".button-disabled").removeClass("button-disabled"),!1):void 0})}};l.init();var u={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".edd-export-form",function(d){d.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"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),t.process_step(1,a,t)}})},process_step:function(t,d,n){e.ajax({type:"POST",url:ajaxurl,data:{form:d,action:"edd_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){var a=e(".edd-export-form").find(".edd-progress").parent().parent(),i=a.find(".notice-wrap");if(a.find(".button-disabled").removeClass("button-disabled"),t.error){var o=t.message;i.html('<div class="updated error"><p>'+o+"</p></div>")}else if(t.success){var r=t.message;i.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+r+'<span class="notice-dismiss"></span></p></div>')}else i.remove(),window.location=t.url}else e(".edd-progress div").animate({width:t.percentage+"%"},50,function(){}),n.process_step(parseInt(t.step),d,n)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})},dismiss_message:function(){e("body").on("click","#edd-batch-success .notice-dismiss",function(){e("#edd-batch-success").parent().slideUp("fast")})}};u.init();var p={init:function(){this.submit()},submit:function(){var t=this;e(".edd-import-form").ajaxForm({beforeSubmit:t.before_submit,success:t.success,complete:t.complete,dataType:"json",error:t.error})},before_submit:function(t,d,n){if(d.find(".notice-wrap").remove(),d.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),!(window.File&&window.FileReader&&window.FileList&&window.Blob)){var a=e(".edd-import-form").find(".edd-progress").parent().parent(),i=a.find(".notice-wrap");return a.find(".button-disabled").removeClass("button-disabled"),i.html('<div class="update error"><p>'+edd_vars.unsupported_browser+"</p></div>"),!1}},success:function(e,t,d,n){},complete:function(t){var d=jQuery.parseJSON(t.responseText);if(d.success){var n=e(".edd-import-form .notice-wrap").parent();n.find(".edd-import-file-wrap,.notice-wrap").remove(),n.find(".edd-import-options").slideDown();var a=n.find("select.edd-import-csv-column"),i=(a.parent().parent(),""),o=d.data.columns.sort(function(e,t){return t>e?-1:e>t?1:0});e.each(o,function(e,t){i+='<option value="'+t+'">'+t+"</option>"}),a.append(i),a.on("change",function(){var t=e(this).val();t&&0!=d.data.first_row[t]?e(this).parent().next().html(d.data.first_row[t]):e(this).parent().next().html("")}),e("body").on("click",".edd-import-proceed",function(e){e.preventDefault(),n.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),d.data.mapping=n.serialize(),p.process_step(1,d.data,self)})}else p.error(t)},error:function(t){var d=jQuery.parseJSON(t.responseText),n=e(".edd-import-form").find(".edd-progress").parent().parent(),a=n.find(".notice-wrap");n.find(".button-disabled").removeClass("button-disabled"),d.data.error?a.html('<div class="update error"><p>'+d.data.error+"</p></div>"):a.remove()},process_step:function(t,d,n){e.ajax({type:"POST",url:ajaxurl,data:{form:d.form,nonce:d.nonce,"class":d["class"],upload:d.upload,mapping:d.mapping,action:"edd_do_ajax_import",step:t},dataType:"json",success:function(t){if("done"==t.data.step||t.data.error){var a=e(".edd-import-form").find(".edd-progress").parent().parent(),i=a.find(".notice-wrap");a.find(".button-disabled").removeClass("button-disabled"),t.data.error?i.html('<div class="update error"><p>'+t.data.error+"</p></div>"):(a.find(".edd-import-options").hide(),e("html, body").animate({scrollTop:a.parent().offset().top},500),i.html('<div class="updated"><p>'+t.data.message+"</p></div>"))}else e(".edd-progress div").animate({width:t.data.percentage+"%"},50,function(){}),p.process_step(parseInt(t.data.step),d,n)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}};p.init();var _={vars:{customer_card_wrap_editable:e(".edd-customer-card-wrapper .editable"),customer_card_wrap_edit_item:e(".edd-customer-card-wrapper .edit-item"),user_id:e('input[name="customerinfo[user_id]"]'),state_input:e(':input[name="customerinfo[state]"]'),note:e("#customer-note")},init:function(){this.edit_customer(),this.add_email(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){e(document.body).on("click","#edit-customer",function(e){e.preventDefault(),_.vars.customer_card_wrap_editable.hide(),_.vars.customer_card_wrap_edit_item.fadeIn().css("display","block")})},add_email:function(){e(document.body).on("click","#add-customer-email",function(t){t.preventDefault();var d=e(this),n=d.parent();n.parent().find(".notice-wrap").remove(),n.find(".spinner").css("visibility","visible"),d.attr("disabled",!0);var a=n.find('input[name="customer-id"]').val(),i=n.find('input[name="additional-email"]').val(),o=n.find('input[name="make-additional-primary"]').is(":checked"),r=n.find('input[name="add_email_nonce"]').val(),s={edd_action:"customer-add-email",customer_id:a,email:i,primary:o,_wpnonce:r};e.post(ajaxurl,s,function(e){!0===e.success?window.location.href=e.redirect:(d.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")})},user_search:function(){e(document.body).on("click.eddSelectUser",".edd_user_search_results a",function(t){t.preventDefault();var d=e(this).data("userid");_.vars.user_id.val(d)})},remove_user:function(){e(document.body).on("click","#disconnect-customer",function(t){t.preventDefault();var d=e('input[name="customerinfo[id]"]').val(),n={edd_action:"disconnect-userid",customer_id:d,_wpnonce:e("#edit-customer-info #_wpnonce").val()};e.post(ajaxurl,n,function(e){window.location.href=window.location.href},"json")})},cancel_edit:function(){e(document.body).on("click","#edd-edit-customer-cancel",function(t){t.preventDefault(),_.vars.customer_card_wrap_edit_item.hide(),_.vars.customer_card_wrap_editable.show(),e(".edd_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"customerinfo[state]"},e.post(ajaxurl,data,function(e){"nostates"==e?_.vars.state_input.replaceWith('<input type="text" name="'+data.field_name+'" value="" class="edd-edit-toggles medium-text"/>'):_.vars.state_input.replaceWith(e)}),!1})},add_note:function(){e(document.body).on("click","#add-customer-note",function(t){t.preventDefault();var d={edd_action:"add-customer-note",customer_id:e("#customer-id").val(),customer_note:_.vars.note.val(),add_customer_note_nonce:e("#add_customer_note_nonce").val()};if(d.customer_note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-customer-notes").prepend(t),e(".edd-no-customer-notes").hide(),_.vars.note.val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=_.vars.note.css("border-color");_.vars.note.css("border-color","red"),setTimeout(function(){_.vars.note.css("border-color",n)},500)}})},delete_checked:function(){e("#edd-customer-delete-confirm").change(function(){var t=e("#edd-customer-delete-records"),d=e("#edd-delete-customer");e(this).prop("checked")?(t.attr("disabled",!1),d.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),d.attr("disabled",!0))})}};_.init(),e(".edd-ajax-user-search").keyup(function(){var t=e(this).val(),d="";e(this).data("exclude")&&(d=e(this).data("exclude")),e(".edd-ajax").show(),data={action:"edd_search_users",user_name:t,exclude:d},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".edd-ajax").hide(),e(".edd_user_search_results").removeClass("hidden"),e(".edd_user_search_results span").html(""),e(t.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),e(document.body).on("click.eddSelectUser",".edd_user_search_results span a",function(t){t.preventDefault();var d=e(this).data("login");e(".edd-ajax-user-search").val(d),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e(document.body).on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(t){t.preventDefault(),e(".edd-ajax-user-search").val(""),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e("#edd_dashboard_sales").length&&e.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(t){e("#edd_dashboard_sales .inside").html(t)}}),e(document).on("keydown",".customer-note-input",function(t){13==t.keyCode&&(t.metaKey||t.ctrlKey)&&e("#add-customer-note").click()})});var eddFormatCurrency=function(e){var t=parseFloat(e),d=edd_vars.currency,n=edd_vars.currency_decimals;
|
2 |
-
return t.toLocaleString(d,{style:"currency",currency:d,minimumFractionDigits:n,maximumFractionDigits:n})},eddFormatNumber=function(e){var t=parseFloat(e),d=edd_vars.currency;edd_vars.currency_decimals;return t.toLocaleString(d,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(e,t){return'<div style="font-size:12px; text-align:center; padding:2px">'+e+"</div>"},eddLegendFormatterSales=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),n='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',a='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatNumber(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+n+a+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i},eddLegendFormatterEarnings=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),n='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',a='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatCurrency(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+n+a+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i};
|
1 |
+
jQuery(document).ready(function(e){e(".edd-help-tip").tooltip({content:function(){return e(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}});var t={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(t){var d=highest=1;return t.parent().find("tr.edd_repeatable_row").each(function(){var t=e(this).data("key");parseInt(t)>highest&&(highest=t)}),d=highest+=1,clone=t.clone(),clone.find("select").each(function(){e(this).val(t.find('select[name="'+e(this).attr("name")+'"]').val())}),clone.removeClass("edd_add_blank"),clone.attr("data-key",d),clone.find("td input, td select, textarea").val(""),clone.find("input, select, textarea").each(function(){var t=e(this).attr("name"),n=e(this).attr("id");t&&(t=t.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),e(this).attr("name",t)),"undefined"!=typeof n&&(n=n.replace(/(\d+)/,parseInt(d)),e(this).attr("id",n))}),clone.find("span.edd_price_id").each(function(){e(this).text(parseInt(d))}),clone.find("span.edd_file_id").each(function(){e(this).text(parseInt(d))}),clone.find(".edd_repeatable_default_input").each(function(){e(this).val(parseInt(d)).removeAttr("checked")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),clone},add:function(){e(document.body).on("click",".submit .edd_add_repeatable",function(d){d.preventDefault();var n=e(this),a=n.parent().parent().prev("tr"),i=t.clone_repeatable(a);i.insertAfter(a).find("input, textarea, select").filter(":visible").eq(0).focus(),i.find(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),i.find(".edd-select-chosen").css("width","100%"),i.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder)})},move:function(){e(".edd_repeatable_table tbody").sortable({handle:".edd_draghandle",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var t=0;e(this).find("tr").each(function(){e(this).find("input.edd_repeatable_index").each(function(){e(this).val(t)}),t++})}})},remove:function(){e(document.body).on("click",".edd_remove_repeatable",function(t){t.preventDefault();var d,n,a,i=e(this).parent().parent("tr"),o=i.parent().find("tr").length-1,r=e(this).data("type"),s="tr.edd_repeatable_"+r+"s";if(d=e(this).is(".ui-sortable tr:first-child .edd_remove_repeatable:first-child")?i.next("tr"):i.prev("tr"),n=d.find("select, input, textarea, button").filter(":visible"),a=n.eq(0),"price"===r){var c=i.data("key");e('.edd_repeatable_condition_field option[value="'+c+'"]').remove()}if(o>1)e("input, select",i).val(""),i.fadeOut("fast").remove(),a.focus();else switch(r){case"price":alert(edd_vars.one_price_min);break;case"file":e("input, select",i).val("");break;default:alert(edd_vars.one_field_min)}e(s).each(function(t){e(this).find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+t+"]"),e(this).attr("name",d).attr("id",d)})})})},type:function(){e(document.body).on("change","#_edd_product_type",function(t){var d=e("#edd_products"),n=e("#edd_download_files"),a=e("#edd_download_limit_wrap");"bundle"===e(this).val()?(d.show(),n.hide(),a.hide()):(d.hide(),n.show(),a.show())})},prices:function(){e(document.body).on("change","#edd_variable_pricing",function(t){e(".edd_pricing_fields,.edd_repeatable_table .pricing").toggle()})},files:function(){if("undefined"==typeof wp||"1"!==edd_vars.new_media_ui)e(".edd_upload_file_button").length>0&&(window.formfield="",e(document.body).on("click",".edd_upload_file_button",function(t){if(t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),null!=edd_vars.post_id)var d="post_id="+edd_vars.post_id+"&";tb_show(edd_vars.add_new_download,"media-upload.php?"+d+"TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1});else{var d;window.formfield="",e(document.body).on("click",".edd_upload_file_button",function(n){n.preventDefault();var a=e(this);return window.formfield=e(this).closest(".edd_repeatable_upload_wrapper"),d?void d.open():(d=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:a.data("uploader-title"),button:{text:a.data("uploader-button-text")},multiple:"0"==e(this).data("multiple")?!1:!0}),d.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),d.on("insert",function(){var e=d.state().get("selection");e.each(function(e,d){if(e=e.toJSON(),0===d)window.formfield.find(".edd_repeatable_attachment_id_field").val(e.id),window.formfield.find(".edd_repeatable_upload_field").val(e.url),window.formfield.find(".edd_repeatable_name_field").val(e.title);else{var n=window.formfield,a=t.clone_repeatable(n);a.find(".edd_repeatable_attachment_id_field").val(e.id),a.find(".edd_repeatable_upload_field").val(e.url),e.title.length>0?a.find(".edd_repeatable_name_field").val(e.title):a.find(".edd_repeatable_name_field").val(e.filename),a.insertAfter(n)}})}),void d.open())});var d;window.formfield=""}},updatePrices:function(){e("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var t=e(this).parents("tr").data("key"),d=e(this).val(),n=e(".edd_repeatable_condition_field option[value="+t+"]");n.length>0?n.text(d):e(".edd_repeatable_condition_field").append(e("<option></option>").attr("value",t).text(d))})}};t.init();var d=e(".edd_datepicker");if(d.length>0){var n="mm/dd/yy";d.datepicker({dateFormat:n})}var a={init:function(){this.edit_address(),this.remove_download(),this.add_download(),this.new_customer(),this.recalculate_total(),this.variable_prices_check(),this.add_note(),this.remove_note(),this.resend_receipt(),this.copy_download_link()},edit_address:function(){e('select[name="edd-payment-address[0][country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"edd-payment-address[0][state]"},e.post(ajaxurl,data,function(t){var d=e("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");"nostates"==t?d.replaceWith('<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>'):d.replaceWith(t)}),!1})},remove_download:function(){e("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var t=e(document.body).find("#edd-purchased-files > .row").length;if(1===t)return alert(edd_vars.one_download_min),!1;if(confirm(edd_vars.delete_payment_download)){var d=e(this).data("key"),n=(e(".edd-payment-id").val(),e('input[name="edd-payment-details-downloads['+d+'][id]"]').val()),a=e('input[name="edd-payment-details-downloads['+d+'][price_id]"]').val(),i=e('input[name="edd-payment-details-downloads['+d+'][quantity]"]').val(),o=e('input[name="edd-payment-details-downloads['+d+'][amount]"]').val(),r=e('input[name="edd-payment-removed"]').val();r=e.parseJSON(r),r.length<1&&(r={});var s=[{id:n,price_id:a,quantity:i,amount:o,cart_index:d}];r[d]=s,e('input[name="edd-payment-removed"]').val(JSON.stringify(r)),e(this).parent().parent().parent().remove(),e("#edd-payment-downloads-changed").val(1),e(".edd-order-payment-recalc-totals").show()}return!1})},new_customer:function(){e("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(t){t.preventDefault(),e(".customer-info").toggle(),e(".new-customer").toggle();var d=e("#edd-new-customer");e(".new-customer").is(":visible")?d.val(1):d.val(0)})},add_download:function(){e("#edd-purchased-files").on("click","#edd-order-add-download",function(t){t.preventDefault();var d=e("#edd_order_download_select"),n=e("#edd-order-download-quantity"),a=e("#edd-order-download-amount"),i=e(".edd_price_options_select option:selected"),o=d.val(),r=d.find(":selected").text(),s=n.val(),c=a.val(),l=i.val(),u=i.text();if(1>o)return!1;if(c||(c=0),c=parseFloat(c),isNaN(c))return alert(edd_vars.numeric_item_price),!1;var p=c;if("1"===edd_vars.quantities_enabled){if(isNaN(parseInt(s)))return alert(edd_vars.numeric_quantity),!1;c*=s}c=c.toFixed(edd_vars.currency_decimals);var _=c+edd_vars.currency_sign;"before"===edd_vars.currency_pos&&(_=edd_vars.currency_sign+c),u&&(r=r+" - "+u);var f=e("#edd-purchased-files div.row").length,m=e("#edd-purchased-files div.row:last").clone();m.find(".download span").html('<a href="post.php?post='+o+'&action=edit"></a>'),m.find(".download span a").text(r),m.find(".price-text").text(_),m.find(".item-quantity").text(s),m.find(".item-price").text(edd_vars.currency_sign+(c/s).toFixed(edd_vars.currency_decimals)),m.find("input.edd-payment-details-download-id").val(o),m.find("input.edd-payment-details-download-price-id").val(l),m.find("input.edd-payment-details-download-item-price").val(p),m.find("input.edd-payment-details-download-amount").val(c),m.find("input.edd-payment-details-download-quantity").val(s),m.find("input.edd-payment-details-download-has-log").val(0),m.find("input").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(f)+"]"),e(this).attr("name",t).attr("id",t)}),e("#edd-payment-downloads-changed").val(1),e(m).insertAfter("#edd-purchased-files div.row:last"),e(".edd-order-payment-recalc-totals").show()})},recalculate_total:function(){e("#edd-order-recalc-total").on("click",function(t){t.preventDefault();var d=0,n=e("#edd-purchased-files .row .edd-payment-details-download-amount");n.length&&n.each(function(){d+=parseFloat(e(this).val())}),e(".edd-payment-fees").length&&e(".edd-payment-fees span.fee-amount").each(function(){d+=parseFloat(e(this).data("fee"))}),e("input[name=edd-payment-total]").val(d.toFixed(edd_vars.currency_decimals))})},variable_prices_check:function(){e("#edd-purchased-files").on("change","select#edd_order_download_select",function(){var t=e(this),d=t.val();if(parseInt(d)>0){var n={action:"edd_check_for_download_price_variations",download_id:d};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(d){e(".edd_price_options_select").remove(),e(d).insertAfter(t.next())}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}})},add_note:function(){e("#edd-add-payment-note").on("click",function(t){t.preventDefault();var d={action:"edd_insert_payment_note",payment_id:e(this).data("payment-id"),note:e("#edd-payment-note").val()};if(d.note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-payment-notes-inner").append(t),e(".edd-no-payment-notes").hide(),e("#edd-payment-note").val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=e("#edd-payment-note").css("border-color");e("#edd-payment-note").css("border-color","red"),setTimeout(function(){e("#edd-payment-note").css("border-color",n)},500)}})},remove_note:function(){e(document.body).on("click",".edd-delete-payment-note",function(t){if(t.preventDefault(),confirm(edd_vars.delete_payment_note)){var d={action:"edd_delete_payment_note",payment_id:e(this).data("payment-id"),note_id:e(this).data("note-id")};return e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){return e("#edd-payment-note-"+d.note_id).remove(),e(".edd-payment-note").length||e(".edd-no-payment-notes").show(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!0}})},resend_receipt:function(){e(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){e(document.body).on("click",".edd-copy-download-link",function(t){t.preventDefault();var d=e(this),n={action:"edd_get_file_download_link",payment_id:e('input[name="edd_payment_id"]').val(),download_id:d.data("download-id"),price_id:d.data("price-id")};e.ajax({type:"POST",data:n,url:ajaxurl,success:function(t){return e("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+t+"</textarea>"),e("#edd-download-link-textarea").focus().select(),!1}}).fail(function(e){window.console&&window.console.log&&console.log(e)})})}};a.init();var i={init:function(){this.type_select(),this.product_requirements()},type_select:function(){e("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){e(".edd-amount-description").toggle()})},product_requirements:function(){e("#products").change(function(){var t=e("#edd-discount-product-conditions");e(this).val()?t.show():t.hide()})}};i.init();var o={init:function(){this.date_options(),this.customers_export()},date_options:function(){e("#edd-graphs-date-options").change(function(){var t=e(this),d=e("#edd-date-range-options");"other"===t.val()?d.show():d.hide()})},customers_export:function(){e("#edd_customer_export_download").change(function(){var t=e(this),d=e("option:selected",t).val(),n=e("#edd_customer_export_option");if("0"===t.val()?n.show():n.hide(),0!=parseInt(d)){var a={action:"edd_check_for_download_price_variations",download_id:d,all_prices:!0},i=e(".edd_price_options_select");e.post(ajaxurl,a,function(t){i.remove(),e("#edd_customer_export_download_chosen").after(t)})}else i.remove()})}};o.init();var r={init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var t=e(".edd-color-picker");if(t.length&&t.wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui){var d=e(".edd_settings_upload_button");d.length>0&&(window.formfield="",e(document.body).on("click",d,function(t){t.preventDefault(),window.formfield=e(this).parent().prev(),window.tbframe_interval=setInterval(function(){jQuery("#TB_iframeContent").contents().find(".savesend .button").val(edd_vars.use_this_file).end().find("#insert-gallery, .wp-post-thumbnail").hide()},2e3),tb_show(edd_vars.add_new_download,"media-upload.php?TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(t){window.formfield?(imgurl=e("a","<div>"+t+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(t),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1})}else{var n;window.formfield="",e(document.body).on("click",".edd_settings_upload_button",function(t){t.preventDefault();var d=e(this);return window.formfield=e(this).parent().prev(),n?void n.open():(n=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:d.data("uploader_title"),button:{text:d.data("uploader_button_text")},multiple:!1}),n.on("menu:render:default",function(e){var t={};e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.set(t)}),n.on("insert",function(){var e=n.state().get("selection");e.each(function(e,t){e=e.toJSON(),window.formfield.val(e.url)})}),void n.open())});var n;window.formfield=""}},taxes:function(){var t=e("select.edd-no-states");t.length&&t.closest("tr").hide(),e('select[name="edd_settings[base_country]"]').change(function(){var t=e(this),d=t.closest("tr");return data={action:"edd_get_shop_states",country:e(this).val(),field_name:"edd_settings[base_state]"},e.post(ajaxurl,data,function(e){"nostates"==e?d.next().hide():(d.next().show(),d.next().find("select").replaceWith(e))}),!1}),e(document.body).on("change","#edd_tax_rates select.edd-tax-country",function(){var t=e(this);return data={action:"edd_get_shop_states",country:e(this).val(),field_name:t.attr("name").replace("country","state")},e.post(ajaxurl,data,function(e){if("nostates"==e){var d='<input type="text" name="'+data.field_name+'" value=""/>';t.parent().next().find("select").replaceWith(d)}else t.parent().next().find("input,select").show(),t.parent().next().find("input,select").replaceWith(e)}),!1}),e("#edd_add_tax_rate").on("click",function(){var t=e("#edd_tax_rates tr:last"),d=t.clone(),n=t.parent().find("tr").length;return d.find("td input").not(":input[type=checkbox]").val(""),d.find('td [type="checkbox"]').attr("checked",!1),d.find("input, select").each(function(){var t=e(this).attr("name");t=t.replace(/\[(\d+)\]/,"["+parseInt(n)+"]"),e(this).attr("name",t).attr("id",t)}),d.find("label").each(function(){var t=e(this).attr("for");t=t.replace(/\[(\d+)\]/,"["+parseInt(n)+"]"),e(this).attr("for",t)}),d.insertAfter(t),!1}),e(document.body).on("click","#edd_tax_rates .edd_remove_tax_rate",function(){if(confirm(edd_vars.delete_tax_rate)){var t=e("#edd_tax_rates tr:visible"),d=t.length;2===d?(e("#edd_tax_rates select").val(""),e('#edd_tax_rates input[type="text"]').val(""),e('#edd_tax_rates input[type="number"]').val(""),e('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):e(this).closest("tr").remove(),e("#edd_tax_rates tr").each(function(t){e(this).children().find("input, select").each(function(){var d=e(this).attr("name");d=d.replace(/\[(\d+)\]/,"["+(t-1)+"]"),e(this).attr("name",d).attr("id",d)})})}return!1})},emails:function(){var t=e("#email-preview-wrap");if(t.length){var d=e("#email-preview");t.colorbox({inline:!0,href:d,width:"80%",height:"auto"})}},misc:function(){var t=e('select[name="edd_settings[download_method]"]'),d=t.parent().parent().next();"direct"==t.val()&&(d.hide(),d.find("input").prop("checked",!1)),t.on("change",function(){"direct"==e(this).val()?(d.hide(),d.find("input").prop("checked",!1)):d.show()})}};r.init(),e(".download_page_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return confirm(edd_vars.delete_payment)?!0:!1}),e("#the-list").on("click",".editinline",function(){var t=e(this).closest("tr").attr("id");t=t.replace("post-","");var d=e("#post-"+t),n=d.find(".column-price .downloadprice-"+t).val();n!=e("#post-"+t+".column-price .downloadprice-"+t).val()?e(".regprice","#edd-download-data").val(n).attr("disabled",!1):e(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),e(document.body).on("click","#bulk_edit",function(){var t=e("#bulk-edit"),d=new Array;t.find("#bulk-titles").children().each(function(){d.push(e(this).attr("id").replace(/^(ttle)/i,""))});var n=e('#edd-download-data input[name="_edd_regprice"]').val(),a={action:"edd_save_bulk_edit",edd_bulk_nonce:d,post_ids:d,price:n};e.post(ajaxurl,a)}),e(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),e(".edd-select-chosen .chosen-search input").each(function(){var t=e(this).parent().parent().parent().prev("select.edd-select-chosen").data("search-type"),d="";if("download"===t)d=edd_vars.search_placeholder;else{var t="search_placeholder_"+t;edd_vars[t]&&(d=edd_vars[t])}e(this).attr("placeholder",d)}),e(".chosen-choices").on("click",function(){e(this).children("li").children("input").attr("placeholder",edd_vars.type_to_search)});var s,c=342;e(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(t){var d=e(this).val(),n=e(this).closest(".edd-select-chosen"),a=n.attr("id").replace("_chosen",""),i=n.hasClass("no-bundles"),o=t.which,r="edd_download_search";n.prev().data("search-type")&&(r="edd_"+n.prev().data("search-type")+"_search"),d.length<=3&&"edd_download_search"==r||16==o||13==o||91==o||17==o||37==o||38==o||39==o||40==o||(clearTimeout(s),s=setTimeout(function(){e.ajax({type:"GET",url:ajaxurl,data:{action:r,s:d,no_bundles:i},dataType:"json",beforeSend:function(){e("ul.chosen-results").empty()},success:function(t){e("#"+a+" option:not(:selected)").remove(),e.each(t,function(t,d){e("#"+a+' option[value="'+d.id+'"]').length||e("#"+a).prepend('<option value="'+d.id+'">'+d.name+"</option>")}),e(".edd-select-chosen").trigger("chosen:updated"),e("#"+a).next().find("input").val(d)}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){})},c))}),e("#post").on("click",".edd-thickbox",function(){e(".edd-select-chosen","#choose-download").css("width","100%")});var l={init:function(){this.revoke_api_key(),this.regenerate_api_key(),this.create_api_key(),this.recount_stats()},revoke_api_key:function(){e(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){e(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd_vars.regenerate_api_key)})},create_api_key:function(){e(document.body).on("submit","#api-key-generate-form",function(t){var d=e('input[type="text"][name="user_id"]');d.css("border-color","#ddd");var n=d.val();return n.length<1||0==n?(d.css("border-color","#ff0000"),!1):void 0})},recount_stats:function(){e("body").on("change","#recount-stats-type",function(){var t=e("#edd-tools-recount-form"),d=e("option:selected",this).data("type"),n=e("#recount-stats-submit"),a=e("#tools-product-dropdown");if(t.find(".notice-wrap").remove(),n.removeClass("button-disabled").attr("disabled",!1),a.hide(),e(".edd-recount-stats-descriptions span").hide(),"recount-download"===d)a.show(),a.find(".edd-select-chosen").css("width","auto");else if("reset-stats"===d){t.append('<div class="notice-wrap"></div>');var i=t.find(".notice-wrap");i.html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+edd_vars.reset_stats_warn+"</label></p></div>"),e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}else a.hide(),a.val(0);e("#"+d).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("#edd-tools-recount-form").submit(function(t){var d=e("#recount-stats-type").val(),n=e(this),a=e("option:selected",this).data("type");if("reset-stats"===a){var i=e("#confirm-reset").is(":checked");if(i)return!0;r=!0}n.find(".notice-wrap").remove(),n.append('<div class="notice-wrap"></div>');var o=n.find(".notice-wrap"),r=!1;if((null===d||0===d)&&(o.html('<div class="updated error"><p>'+edd_vars.batch_export_no_class+"</p></div>"),r=!0),"recount-download"===a){var s=e('select[name="download_id"]').val();0==s&&(o.html('<div class="updated error"><p>'+edd_vars.batch_export_no_reqs+"</p></div>"),r=!0)}return r?(n.find(".button-disabled").removeClass("button-disabled"),!1):void 0})}};l.init();var u={init:function(){this.submit(),this.dismiss_message()},submit:function(){var t=this;e(document.body).on("submit",".edd-export-form",function(d){d.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"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),t.process_step(1,a,t)}})},process_step:function(t,d,n){e.ajax({type:"POST",url:ajaxurl,data:{form:d,action:"edd_do_ajax_export",step:t},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){var a=e(".edd-export-form").find(".edd-progress").parent().parent(),i=a.find(".notice-wrap");if(a.find(".button-disabled").removeClass("button-disabled"),t.error){var o=t.message;i.html('<div class="updated error"><p>'+o+"</p></div>")}else if(t.success){var r=t.message;i.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+r+'<span class="notice-dismiss"></span></p></div>')}else i.remove(),window.location=t.url}else e(".edd-progress div").animate({width:t.percentage+"%"},50,function(){}),n.process_step(parseInt(t.step),d,n)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})},dismiss_message:function(){e("body").on("click","#edd-batch-success .notice-dismiss",function(){e("#edd-batch-success").parent().slideUp("fast")})}};u.init();var p={init:function(){this.submit()},submit:function(){var t=this;e(".edd-import-form").ajaxForm({beforeSubmit:t.before_submit,success:t.success,complete:t.complete,dataType:"json",error:t.error})},before_submit:function(t,d,n){if(d.find(".notice-wrap").remove(),d.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),!(window.File&&window.FileReader&&window.FileList&&window.Blob)){var a=e(".edd-import-form").find(".edd-progress").parent().parent(),i=a.find(".notice-wrap");return a.find(".button-disabled").removeClass("button-disabled"),i.html('<div class="update error"><p>'+edd_vars.unsupported_browser+"</p></div>"),!1}},success:function(e,t,d,n){},complete:function(t){var d=jQuery.parseJSON(t.responseText);if(d.success){var n=e(".edd-import-form .notice-wrap").parent();n.find(".edd-import-file-wrap,.notice-wrap").remove(),n.find(".edd-import-options").slideDown();var a=n.find("select.edd-import-csv-column"),i=(a.parent().parent(),""),o=d.data.columns.sort(function(e,t){return t>e?-1:e>t?1:0});e.each(o,function(e,t){i+='<option value="'+t+'">'+t+"</option>"}),a.append(i),a.on("change",function(){var t=e(this).val();t&&0!=d.data.first_row[t]?e(this).parent().next().html(d.data.first_row[t]):e(this).parent().next().html("")}),e("body").on("click",".edd-import-proceed",function(e){e.preventDefault(),n.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),d.data.mapping=n.serialize(),p.process_step(1,d.data,self)})}else p.error(t)},error:function(t){var d=jQuery.parseJSON(t.responseText),n=e(".edd-import-form").find(".edd-progress").parent().parent(),a=n.find(".notice-wrap");n.find(".button-disabled").removeClass("button-disabled"),d.data.error?a.html('<div class="update error"><p>'+d.data.error+"</p></div>"):a.remove()},process_step:function(t,d,n){e.ajax({type:"POST",url:ajaxurl,data:{form:d.form,nonce:d.nonce,"class":d["class"],upload:d.upload,mapping:d.mapping,action:"edd_do_ajax_import",step:t},dataType:"json",success:function(t){if("done"==t.data.step||t.data.error){var a=e(".edd-import-form").find(".edd-progress").parent().parent(),i=a.find(".notice-wrap");a.find(".button-disabled").removeClass("button-disabled"),t.data.error?i.html('<div class="update error"><p>'+t.data.error+"</p></div>"):(a.find(".edd-import-options").hide(),e("html, body").animate({scrollTop:a.parent().offset().top},500),i.html('<div class="updated"><p>'+t.data.message+"</p></div>"))}else e(".edd-progress div").animate({width:t.data.percentage+"%"},50,function(){}),p.process_step(parseInt(t.data.step),d,n)}}).fail(function(e){window.console&&window.console.log&&console.log(e)})}};p.init();var _={vars:{customer_card_wrap_editable:e(".edd-customer-card-wrapper .editable"),customer_card_wrap_edit_item:e(".edd-customer-card-wrapper .edit-item"),user_id:e('input[name="customerinfo[user_id]"]'),state_input:e(':input[name="customerinfo[state]"]'),note:e("#customer-note")},init:function(){this.edit_customer(),this.add_email(),this.user_search(),this.remove_user(),this.cancel_edit(),this.change_country(),this.add_note(),this.delete_checked()},edit_customer:function(){e(document.body).on("click","#edit-customer",function(e){e.preventDefault(),_.vars.customer_card_wrap_editable.hide(),_.vars.customer_card_wrap_edit_item.fadeIn().css("display","block")})},add_email:function(){e(document.body).on("click","#add-customer-email",function(t){t.preventDefault();var d=e(this),n=d.parent();n.parent().find(".notice-wrap").remove(),n.find(".spinner").css("visibility","visible"),d.attr("disabled",!0);var a=n.find('input[name="customer-id"]').val(),i=n.find('input[name="additional-email"]').val(),o=n.find('input[name="make-additional-primary"]').is(":checked"),r=n.find('input[name="add_email_nonce"]').val(),s={edd_action:"customer-add-email",customer_id:a,email:i,primary:o,_wpnonce:r};e.post(ajaxurl,s,function(e){!0===e.success?window.location.href=e.redirect:(d.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")})},user_search:function(){e(document.body).on("click.eddSelectUser",".edd_user_search_results a",function(t){t.preventDefault();var d=e(this).data("userid");_.vars.user_id.val(d)})},remove_user:function(){e(document.body).on("click","#disconnect-customer",function(t){t.preventDefault();var d=e('input[name="customerinfo[id]"]').val(),n={edd_action:"disconnect-userid",customer_id:d,_wpnonce:e("#edit-customer-info #_wpnonce").val()};e.post(ajaxurl,n,function(e){window.location.href=window.location.href},"json")})},cancel_edit:function(){e(document.body).on("click","#edd-edit-customer-cancel",function(t){t.preventDefault(),_.vars.customer_card_wrap_edit_item.hide(),_.vars.customer_card_wrap_editable.show(),e(".edd_user_search_results").html("")})},change_country:function(){e('select[name="customerinfo[country]"]').change(function(){var t=e(this);return data={action:"edd_get_shop_states",country:t.val(),field_name:"customerinfo[state]"},e.post(ajaxurl,data,function(e){"nostates"==e?_.vars.state_input.replaceWith('<input type="text" name="'+data.field_name+'" value="" class="edd-edit-toggles medium-text"/>'):_.vars.state_input.replaceWith(e)}),!1})},add_note:function(){e(document.body).on("click","#add-customer-note",function(t){t.preventDefault();var d={edd_action:"add-customer-note",customer_id:e("#customer-id").val(),customer_note:_.vars.note.val(),add_customer_note_nonce:e("#add_customer_note_nonce").val()};if(d.customer_note)e.ajax({type:"POST",data:d,url:ajaxurl,success:function(t){e("#edd-customer-notes").prepend(t),e(".edd-no-customer-notes").hide(),_.vars.note.val("")}}).fail(function(e){window.console&&window.console.log&&console.log(e)});else{var n=_.vars.note.css("border-color");_.vars.note.css("border-color","red"),setTimeout(function(){_.vars.note.css("border-color",n)},500)}})},delete_checked:function(){e("#edd-customer-delete-confirm").change(function(){var t=e("#edd-customer-delete-records"),d=e("#edd-delete-customer");e(this).prop("checked")?(t.attr("disabled",!1),d.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),d.attr("disabled",!0))})}};_.init(),e(".edd-ajax-user-search").keyup(function(){var t=e(this).val(),d="";e(this).data("exclude")&&(d=e(this).data("exclude")),e(".edd-ajax").show(),data={action:"edd_search_users",user_name:t,exclude:d},document.body.style.cursor="wait",e.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(t){e(".edd-ajax").hide(),e(".edd_user_search_results").removeClass("hidden"),e(".edd_user_search_results span").html(""),e(t.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),e(document.body).on("click.eddSelectUser",".edd_user_search_results span a",function(t){t.preventDefault();var d=e(this).data("login");e(".edd-ajax-user-search").val(d),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e(document.body).on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(t){t.preventDefault(),e(".edd-ajax-user-search").val(""),e(".edd_user_search_results").addClass("hidden"),e(".edd_user_search_results span").html("")}),e("#edd_dashboard_sales").length&&e.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(t){e("#edd_dashboard_sales .inside").html(t)}}),e(document).on("keydown",".customer-note-input",function(t){
|
2 |
+
13==t.keyCode&&(t.metaKey||t.ctrlKey)&&e("#add-customer-note").click()})});var eddFormatCurrency=function(e){var t=parseFloat(e),d=edd_vars.currency,n=edd_vars.currency_decimals;return t.toLocaleString(d,{style:"currency",currency:d,minimumFractionDigits:n,maximumFractionDigits:n})},eddFormatNumber=function(e){var t=parseFloat(e),d=edd_vars.currency;edd_vars.currency_decimals;return t.toLocaleString(d,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(e,t){return'<div style="font-size:12px; text-align:center; padding:2px">'+e+"</div>"},eddLegendFormatterSales=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),n='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',a='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatNumber(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+n+a+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i},eddLegendFormatterEarnings=function(e,t){var d=e.toLowerCase().replace(/\s/g,"-"),n='<div class="edd-legend-color" style="background-color: '+t.color+'"></div>',a='<div class="edd-pie-legend-item">'+e+": "+Math.round(t.percent)+"% ("+eddFormatCurrency(t.data[0][1])+")</div>",i='<div id="'+t.edd_vars.id+d+'" class="edd-legend-item-wrapper">'+n+a+"</div>";return jQuery("#edd-pie-legend-"+t.edd_vars.id).append(i),i};
|
easy-digital-downloads.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The easiest way to sell digital products with WordPress.
|
6 |
* Author: Pippin Williamson and Company
|
7 |
* Author URI: https://easydigitaldownloads.com
|
8 |
-
* Version: 2.6.
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -25,7 +25,7 @@
|
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
-
* @version 2.6.
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
@@ -195,7 +195,7 @@ final class Easy_Digital_Downloads {
|
|
195 |
|
196 |
// Plugin version.
|
197 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
198 |
-
define( 'EDD_VERSION', '2.6.
|
199 |
}
|
200 |
|
201 |
// Plugin Folder Path.
|
5 |
* Description: The easiest way to sell digital products with WordPress.
|
6 |
* Author: Pippin Williamson and Company
|
7 |
* Author URI: https://easydigitaldownloads.com
|
8 |
+
* Version: 2.6.6
|
9 |
* Text Domain: easy-digital-downloads
|
10 |
* Domain Path: languages
|
11 |
*
|
25 |
* @package EDD
|
26 |
* @category Core
|
27 |
* @author Pippin Williamson
|
28 |
+
* @version 2.6.6
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
195 |
|
196 |
// Plugin version.
|
197 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
198 |
+
define( 'EDD_VERSION', '2.6.6' );
|
199 |
}
|
200 |
|
201 |
// Plugin Folder Path.
|
includes/admin/customers/customer-actions.php
CHANGED
@@ -506,7 +506,7 @@ add_action( 'edd_delete-customer', 'edd_customer_delete', 10, 1 );
|
|
506 |
* Disconnect a user ID from a customer
|
507 |
*
|
508 |
* @since 2.3
|
509 |
-
* @param array $args Array of
|
510 |
* @return bool If the disconnect was sucessful
|
511 |
*/
|
512 |
function edd_disconnect_customer_user_id( $args ) {
|
506 |
* Disconnect a user ID from a customer
|
507 |
*
|
508 |
* @since 2.3
|
509 |
+
* @param array $args Array of arguments
|
510 |
* @return bool If the disconnect was sucessful
|
511 |
*/
|
512 |
function edd_disconnect_customer_user_id( $args ) {
|
includes/admin/payments/view-order-details.php
CHANGED
@@ -171,7 +171,7 @@ $currency_code = $payment->currency;
|
|
171 |
</div><!-- /.edd-order-update-box -->
|
172 |
|
173 |
</div><!-- /#edd-order-data -->
|
174 |
-
|
175 |
<?php if( edd_is_payment_complete( $payment_id ) ) : ?>
|
176 |
<div id="edd-order-resend-receipt" class="postbox edd-order-data">
|
177 |
<div class="inside">
|
@@ -185,7 +185,7 @@ $currency_code = $payment->currency;
|
|
185 |
</div>
|
186 |
</div>
|
187 |
<?php endif; ?>
|
188 |
-
|
189 |
<div id="edd-order-details" class="postbox edd-order-data">
|
190 |
|
191 |
<h3 class="hndle">
|
@@ -425,7 +425,15 @@ $currency_code = $payment->currency;
|
|
425 |
|
426 |
<div class="column-container customer-info">
|
427 |
<div class="column">
|
428 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
</div>
|
430 |
<div class="column">
|
431 |
<input type="hidden" name="edd-current-customer" value="<?php echo $customer->id; ?>" />
|
@@ -507,11 +515,12 @@ $currency_code = $payment->currency;
|
|
507 |
echo EDD()->html->select( array(
|
508 |
'options' => edd_get_country_list(),
|
509 |
'name' => 'edd-payment-address[0][country]',
|
510 |
-
'selected' => $address['country'],
|
511 |
'show_option_all' => false,
|
512 |
'show_option_none' => false,
|
513 |
'chosen' => true,
|
514 |
-
'placeholder'
|
|
|
515 |
) );
|
516 |
?>
|
517 |
</p>
|
@@ -523,11 +532,12 @@ $currency_code = $payment->currency;
|
|
523 |
echo EDD()->html->select( array(
|
524 |
'options' => $states,
|
525 |
'name' => 'edd-payment-address[0][state]',
|
526 |
-
'selected' => $address['state'],
|
527 |
'show_option_all' => false,
|
528 |
'show_option_none' => false,
|
529 |
'chosen' => true,
|
530 |
-
'placeholder'
|
|
|
531 |
) );
|
532 |
} else { ?>
|
533 |
<input type="text" name="edd-payment-address[0][state]" value="<?php echo esc_attr( $address['state'] ); ?>" class="medium-text"/>
|
171 |
</div><!-- /.edd-order-update-box -->
|
172 |
|
173 |
</div><!-- /#edd-order-data -->
|
174 |
+
|
175 |
<?php if( edd_is_payment_complete( $payment_id ) ) : ?>
|
176 |
<div id="edd-order-resend-receipt" class="postbox edd-order-data">
|
177 |
<div class="inside">
|
185 |
</div>
|
186 |
</div>
|
187 |
<?php endif; ?>
|
188 |
+
|
189 |
<div id="edd-order-details" class="postbox edd-order-data">
|
190 |
|
191 |
<h3 class="hndle">
|
425 |
|
426 |
<div class="column-container customer-info">
|
427 |
<div class="column">
|
428 |
+
<?php
|
429 |
+
$args = array(
|
430 |
+
'selected' => $customer->id,
|
431 |
+
'name' => 'customer-id',
|
432 |
+
'placeholder' => __( 'Type to search all Customers', 'easy-digital-downloads' ),
|
433 |
+
);
|
434 |
+
|
435 |
+
echo EDD()->html->customer_dropdown( $args );
|
436 |
+
?>
|
437 |
</div>
|
438 |
<div class="column">
|
439 |
<input type="hidden" name="edd-current-customer" value="<?php echo $customer->id; ?>" />
|
515 |
echo EDD()->html->select( array(
|
516 |
'options' => edd_get_country_list(),
|
517 |
'name' => 'edd-payment-address[0][country]',
|
518 |
+
'selected' => $address[ 'country' ],
|
519 |
'show_option_all' => false,
|
520 |
'show_option_none' => false,
|
521 |
'chosen' => true,
|
522 |
+
'placeholder' => __( 'Select a country', 'easy-digital-downloads' ),
|
523 |
+
'data' => array( 'search-type' => 'country' ),
|
524 |
) );
|
525 |
?>
|
526 |
</p>
|
532 |
echo EDD()->html->select( array(
|
533 |
'options' => $states,
|
534 |
'name' => 'edd-payment-address[0][state]',
|
535 |
+
'selected' => $address[ 'state' ],
|
536 |
'show_option_all' => false,
|
537 |
'show_option_none' => false,
|
538 |
'chosen' => true,
|
539 |
+
'placeholder' => __( 'Select a state', 'easy-digital-downloads' ),
|
540 |
+
'data' => array( 'search-type' => 'state' ),
|
541 |
) );
|
542 |
} else { ?>
|
543 |
<input type="text" name="edd-payment-address[0][state]" value="<?php echo esc_attr( $address['state'] ); ?>" class="medium-text"/>
|
includes/cart/functions.php
CHANGED
@@ -199,6 +199,8 @@ function edd_add_to_cart( $download_id, $options = array() ) {
|
|
199 |
$options['price_id'] = explode( ',', $options['price_id'] );
|
200 |
}
|
201 |
|
|
|
|
|
202 |
if ( isset( $options['price_id'] ) && is_array( $options['price_id'] ) ) {
|
203 |
|
204 |
// Process multiple price options at once
|
@@ -233,8 +235,10 @@ function edd_add_to_cart( $download_id, $options = array() ) {
|
|
233 |
);
|
234 |
}
|
235 |
|
236 |
-
foreach ( $items as
|
237 |
-
$
|
|
|
|
|
238 |
if ( ! is_array( $to_add ) )
|
239 |
return;
|
240 |
|
@@ -259,9 +263,11 @@ function edd_add_to_cart( $download_id, $options = array() ) {
|
|
259 |
}
|
260 |
}
|
261 |
|
|
|
|
|
262 |
EDD()->session->set( 'edd_cart', $cart );
|
263 |
|
264 |
-
do_action( 'edd_post_add_to_cart', $download_id, $options );
|
265 |
|
266 |
// Clear all the checkout errors, if any
|
267 |
edd_clear_errors();
|
199 |
$options['price_id'] = explode( ',', $options['price_id'] );
|
200 |
}
|
201 |
|
202 |
+
$items = array();
|
203 |
+
|
204 |
if ( isset( $options['price_id'] ) && is_array( $options['price_id'] ) ) {
|
205 |
|
206 |
// Process multiple price options at once
|
235 |
);
|
236 |
}
|
237 |
|
238 |
+
foreach ( $items as &$item ) {
|
239 |
+
$item = apply_filters( 'edd_add_to_cart_item', $item );
|
240 |
+
$to_add = $item;
|
241 |
+
|
242 |
if ( ! is_array( $to_add ) )
|
243 |
return;
|
244 |
|
263 |
}
|
264 |
}
|
265 |
|
266 |
+
unset( $item );
|
267 |
+
|
268 |
EDD()->session->set( 'edd_cart', $cart );
|
269 |
|
270 |
+
do_action( 'edd_post_add_to_cart', $download_id, $options, $items );
|
271 |
|
272 |
// Clear all the checkout errors, if any
|
273 |
edd_clear_errors();
|
includes/class-edd-html-elements.php
CHANGED
@@ -172,6 +172,7 @@ class EDD_HTML_Elements {
|
|
172 |
'class' => $args['class'] . ' edd-customer-select',
|
173 |
'options' => $options,
|
174 |
'multiple' => $args['multiple'],
|
|
|
175 |
'chosen' => $args['chosen'],
|
176 |
'show_option_all' => false,
|
177 |
'show_option_none' => false,
|
172 |
'class' => $args['class'] . ' edd-customer-select',
|
173 |
'options' => $options,
|
174 |
'multiple' => $args['multiple'],
|
175 |
+
'placeholder' => $args['placeholder'],
|
176 |
'chosen' => $args['chosen'],
|
177 |
'show_option_all' => false,
|
178 |
'show_option_none' => false,
|
includes/class-edd-register-meta.php
CHANGED
@@ -86,7 +86,7 @@ class EDD_Register_Meta {
|
|
86 |
array(
|
87 |
'sanitize_callback' => array( $this, 'intval_wrapper' ),
|
88 |
'type' => 'float',
|
89 |
-
'description' => __( 'The
|
90 |
)
|
91 |
);
|
92 |
|
@@ -228,7 +228,7 @@ class EDD_Register_Meta {
|
|
228 |
array(
|
229 |
'sanitize_callback' => array( $this, 'intval_wrapper' ),
|
230 |
'type' => 'int',
|
231 |
-
'description' => __( 'The User ID
|
232 |
)
|
233 |
);
|
234 |
|
@@ -284,7 +284,7 @@ class EDD_Register_Meta {
|
|
284 |
array(
|
285 |
'sanitize_callback' => 'sanitize_text_field',
|
286 |
'type' => 'string',
|
287 |
-
'description' => __( '
|
288 |
)
|
289 |
);
|
290 |
|
@@ -353,7 +353,7 @@ class EDD_Register_Meta {
|
|
353 |
|
354 |
/**
|
355 |
* Wrapper for intval
|
356 |
-
* Setting intval as the callback was stating an improper number of
|
357 |
*
|
358 |
* @since 2.5
|
359 |
* @param int $value The value to sanitize.
|
86 |
array(
|
87 |
'sanitize_callback' => array( $this, 'intval_wrapper' ),
|
88 |
'type' => 'float',
|
89 |
+
'description' => __( 'The number of sales for the specified product.', 'easy-digital-downloads' ),
|
90 |
)
|
91 |
);
|
92 |
|
228 |
array(
|
229 |
'sanitize_callback' => array( $this, 'intval_wrapper' ),
|
230 |
'type' => 'int',
|
231 |
+
'description' => __( 'The User ID associated with the payment.', 'easy-digital-downloads' ),
|
232 |
)
|
233 |
);
|
234 |
|
284 |
array(
|
285 |
'sanitize_callback' => 'sanitize_text_field',
|
286 |
'type' => 'string',
|
287 |
+
'description' => __( 'Identifies if the purchase was made in Test or Live mode.', 'easy-digital-downloads' ),
|
288 |
)
|
289 |
);
|
290 |
|
353 |
|
354 |
/**
|
355 |
* Wrapper for intval
|
356 |
+
* Setting intval as the callback was stating an improper number of arguments, this avoids that.
|
357 |
*
|
358 |
* @since 2.5
|
359 |
* @param int $value The value to sanitize.
|
includes/discount-functions.php
CHANGED
@@ -1519,7 +1519,7 @@ function edd_apply_preset_discount() {
|
|
1519 |
add_action( 'init', 'edd_apply_preset_discount', 999 );
|
1520 |
|
1521 |
/**
|
1522 |
-
* Updates discounts that are expired or at max use (that
|
1523 |
*
|
1524 |
* @since 2.6
|
1525 |
* @return void
|
@@ -1528,17 +1528,18 @@ function edd_discount_status_cleanup() {
|
|
1528 |
global $wpdb;
|
1529 |
|
1530 |
// We only want to get 25 active discounts to check their status per step here
|
1531 |
-
$cron_discount_number
|
1532 |
$discount_ids_to_update = array();
|
1533 |
$needs_inactive_meta = array();
|
1534 |
$needs_expired_meta = array();
|
1535 |
|
1536 |
// start by getting the last 25 that hit their maximum usage
|
1537 |
$args = array(
|
1538 |
-
'
|
1539 |
-
'
|
1540 |
-
'
|
1541 |
-
'
|
|
|
1542 |
'relation' => 'AND',
|
1543 |
array(
|
1544 |
'key' => '_edd_discount_uses',
|
@@ -1552,14 +1553,15 @@ function edd_discount_status_cleanup() {
|
|
1552 |
'compare' => 'NOT IN',
|
1553 |
),
|
1554 |
array(
|
1555 |
-
'key' => '
|
1556 |
-
'
|
1557 |
-
'compare' => '!=',
|
1558 |
),
|
1559 |
),
|
1560 |
);
|
1561 |
|
|
|
1562 |
$discounts = edd_get_discounts( $args );
|
|
|
1563 |
|
1564 |
if ( $discounts ) {
|
1565 |
foreach ( $discounts as $discount ) {
|
@@ -1604,19 +1606,37 @@ function edd_discount_status_cleanup() {
|
|
1604 |
}
|
1605 |
|
1606 |
$discount_ids_to_update = array_unique( $discount_ids_to_update );
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
|
|
|
|
1610 |
|
1611 |
$needs_inactive_meta = array_unique( $needs_inactive_meta );
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
|
|
|
|
1615 |
|
1616 |
$needs_expired_meta = array_unique( $needs_expired_meta );
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
|
|
|
|
1620 |
|
1621 |
}
|
1622 |
add_action( 'edd_daily_scheduled_events', 'edd_discount_status_cleanup' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1519 |
add_action( 'init', 'edd_apply_preset_discount', 999 );
|
1520 |
|
1521 |
/**
|
1522 |
+
* Updates discounts that are expired or at max use (that are not already marked as so) as inactive or expired
|
1523 |
*
|
1524 |
* @since 2.6
|
1525 |
* @return void
|
1528 |
global $wpdb;
|
1529 |
|
1530 |
// We only want to get 25 active discounts to check their status per step here
|
1531 |
+
$cron_discount_number = apply_filters( 'edd_discount_status_cleanup_count', 25 );
|
1532 |
$discount_ids_to_update = array();
|
1533 |
$needs_inactive_meta = array();
|
1534 |
$needs_expired_meta = array();
|
1535 |
|
1536 |
// start by getting the last 25 that hit their maximum usage
|
1537 |
$args = array(
|
1538 |
+
'suppress_filters' => false,
|
1539 |
+
'post_status' => array( 'active' ),
|
1540 |
+
'posts_per_page' => $cron_discount_number,
|
1541 |
+
'order' => 'ASC',
|
1542 |
+
'meta_query' => array(
|
1543 |
'relation' => 'AND',
|
1544 |
array(
|
1545 |
'key' => '_edd_discount_uses',
|
1553 |
'compare' => 'NOT IN',
|
1554 |
),
|
1555 |
array(
|
1556 |
+
'key' => '_edd_discount_max_uses',
|
1557 |
+
'compare' => 'EXISTS',
|
|
|
1558 |
),
|
1559 |
),
|
1560 |
);
|
1561 |
|
1562 |
+
add_filter( 'posts_request', 'edd_filter_discount_code_cleanup' );
|
1563 |
$discounts = edd_get_discounts( $args );
|
1564 |
+
remove_filter( 'posts_request', 'edd_filter_discount_code_cleanup' );
|
1565 |
|
1566 |
if ( $discounts ) {
|
1567 |
foreach ( $discounts as $discount ) {
|
1606 |
}
|
1607 |
|
1608 |
$discount_ids_to_update = array_unique( $discount_ids_to_update );
|
1609 |
+
if ( ! empty ( $discount_ids_to_update ) ) {
|
1610 |
+
$discount_ids_string = "'" . implode( "','", $discount_ids_to_update ) . "'";
|
1611 |
+
$sql = "UPDATE $wpdb->posts SET post_status = 'inactive' WHERE ID IN ($discount_ids_string)";
|
1612 |
+
$wpdb->query( $sql );
|
1613 |
+
}
|
1614 |
|
1615 |
$needs_inactive_meta = array_unique( $needs_inactive_meta );
|
1616 |
+
if ( ! empty( $needs_inactive_meta ) ) {
|
1617 |
+
$inactive_ids = "'" . implode( "','", $needs_inactive_meta ) . "'";
|
1618 |
+
$sql = "UPDATE $wpdb->postmeta SET meta_value = 'inactive' WHERE meta_key = '_edd_discount_status' AND post_id IN ($inactive_ids)";
|
1619 |
+
$wpdb->query( $sql );
|
1620 |
+
}
|
1621 |
|
1622 |
$needs_expired_meta = array_unique( $needs_expired_meta );
|
1623 |
+
if ( ! empty( $needs_expired_meta ) ) {
|
1624 |
+
$expired_ids = "'" . implode( "','", $needs_expired_meta ) . "'";
|
1625 |
+
$sql = "UPDATE $wpdb->postmeta SET meta_value = 'inactive' WHERE meta_key = '_edd_discount_status' AND post_id IN ($expired_ids)";
|
1626 |
+
$wpdb->query( $sql );
|
1627 |
+
}
|
1628 |
|
1629 |
}
|
1630 |
add_action( 'edd_daily_scheduled_events', 'edd_discount_status_cleanup' );
|
1631 |
+
|
1632 |
+
/**
|
1633 |
+
* Used during edd_discount_status_cleanup to filter out a meta query properly
|
1634 |
+
*
|
1635 |
+
* @since 2.6.6
|
1636 |
+
* @param string $sql The unmodified SQL statement.
|
1637 |
+
* @return string The sql statement with removed quotes from the column.
|
1638 |
+
*/
|
1639 |
+
function edd_filter_discount_code_cleanup( $sql ) {
|
1640 |
+
return str_replace( "'mt1.meta_value'", "mt1.meta_value", $sql );
|
1641 |
+
}
|
1642 |
+
|
includes/process-download.php
CHANGED
@@ -739,8 +739,8 @@ function edd_readfile_chunked( $file, $retbytes = true ) {
|
|
739 |
* Used to process an old URL format for downloads
|
740 |
*
|
741 |
* @since 2.3
|
742 |
-
* @param array $args
|
743 |
-
* @return array Same
|
744 |
*/
|
745 |
function edd_process_legacy_download_url( $args ) {
|
746 |
|
@@ -760,8 +760,8 @@ function edd_process_legacy_download_url( $args ) {
|
|
760 |
* Used to process a signed URL for processing downloads
|
761 |
*
|
762 |
* @since 2.3
|
763 |
-
* @param array $args
|
764 |
-
* @return array Same
|
765 |
*/
|
766 |
function edd_process_signed_download_url( $args ) {
|
767 |
|
739 |
* Used to process an old URL format for downloads
|
740 |
*
|
741 |
* @since 2.3
|
742 |
+
* @param array $args Arguments provided to download a file
|
743 |
+
* @return array Same arguments, with the status of verification added
|
744 |
*/
|
745 |
function edd_process_legacy_download_url( $args ) {
|
746 |
|
760 |
* Used to process a signed URL for processing downloads
|
761 |
*
|
762 |
* @since 2.3
|
763 |
+
* @param array $args Arguments provided to download a file
|
764 |
+
* @return array Same arguments, with the status of verification added
|
765 |
*/
|
766 |
function edd_process_signed_download_url( $args ) {
|
767 |
|
includes/scripts.php
CHANGED
@@ -188,39 +188,42 @@ function edd_load_admin_scripts( $hook ) {
|
|
188 |
wp_enqueue_script( 'edd-admin-scripts' );
|
189 |
|
190 |
wp_localize_script( 'edd-admin-scripts', 'edd_vars', array(
|
191 |
-
'post_id'
|
192 |
-
'edd_version'
|
193 |
-
'add_new_download'
|
194 |
-
'use_this_file'
|
195 |
-
'quick_edit_warning'
|
196 |
-
'delete_payment'
|
197 |
-
'delete_payment_note'
|
198 |
-
'delete_tax_rate'
|
199 |
-
'revoke_api_key'
|
200 |
-
'regenerate_api_key'
|
201 |
-
'resend_receipt'
|
202 |
-
'copy_download_link_text'
|
203 |
-
'delete_payment_download'
|
204 |
-
'one_price_min'
|
205 |
-
'one_field_min'
|
206 |
-
'one_download_min'
|
207 |
-
'one_option'
|
208 |
-
'one_or_more_option'
|
209 |
-
'numeric_item_price'
|
210 |
-
'numeric_quantity'
|
211 |
-
'currency'
|
212 |
-
'currency_sign'
|
213 |
-
'currency_pos'
|
214 |
-
'currency_decimals'
|
215 |
-
'new_media_ui'
|
216 |
-
'remove_text'
|
217 |
-
'type_to_search'
|
218 |
-
'quantities_enabled'
|
219 |
-
'batch_export_no_class'
|
220 |
-
'batch_export_no_reqs'
|
221 |
-
'reset_stats_warn'
|
222 |
-
'search_placeholder'
|
223 |
-
'
|
|
|
|
|
|
|
224 |
));
|
225 |
|
226 |
wp_enqueue_style( 'wp-color-picker' );
|
188 |
wp_enqueue_script( 'edd-admin-scripts' );
|
189 |
|
190 |
wp_localize_script( 'edd-admin-scripts', 'edd_vars', array(
|
191 |
+
'post_id' => isset( $post->ID ) ? $post->ID : null,
|
192 |
+
'edd_version' => EDD_VERSION,
|
193 |
+
'add_new_download' => __( 'Add New Download', 'easy-digital-downloads' ),
|
194 |
+
'use_this_file' => __( 'Use This File', 'easy-digital-downloads' ),
|
195 |
+
'quick_edit_warning' => __( 'Sorry, not available for variable priced products.', 'easy-digital-downloads' ),
|
196 |
+
'delete_payment' => __( 'Are you sure you wish to delete this payment?', 'easy-digital-downloads' ),
|
197 |
+
'delete_payment_note' => __( 'Are you sure you wish to delete this note?', 'easy-digital-downloads' ),
|
198 |
+
'delete_tax_rate' => __( 'Are you sure you wish to delete this tax rate?', 'easy-digital-downloads' ),
|
199 |
+
'revoke_api_key' => __( 'Are you sure you wish to revoke this API key?', 'easy-digital-downloads' ),
|
200 |
+
'regenerate_api_key' => __( 'Are you sure you wish to regenerate this API key?', 'easy-digital-downloads' ),
|
201 |
+
'resend_receipt' => __( 'Are you sure you wish to resend the purchase receipt?', 'easy-digital-downloads' ),
|
202 |
+
'copy_download_link_text' => __( 'Copy these links to your clipboard and give them to your customer', 'easy-digital-downloads' ),
|
203 |
+
'delete_payment_download' => sprintf( __( 'Are you sure you wish to delete this %s?', 'easy-digital-downloads' ), edd_get_label_singular() ),
|
204 |
+
'one_price_min' => __( 'You must have at least one price', 'easy-digital-downloads' ),
|
205 |
+
'one_field_min' => __( 'You must have at least one field', 'easy-digital-downloads' ),
|
206 |
+
'one_download_min' => __( 'Payments must contain at least one item', 'easy-digital-downloads' ),
|
207 |
+
'one_option' => sprintf( __( 'Choose a %s', 'easy-digital-downloads' ), edd_get_label_singular() ),
|
208 |
+
'one_or_more_option' => sprintf( __( 'Choose one or more %s', 'easy-digital-downloads' ), edd_get_label_plural() ),
|
209 |
+
'numeric_item_price' => __( 'Item price must be numeric', 'easy-digital-downloads' ),
|
210 |
+
'numeric_quantity' => __( 'Quantity must be numeric', 'easy-digital-downloads' ),
|
211 |
+
'currency' => edd_get_currency(),
|
212 |
+
'currency_sign' => edd_currency_filter( '' ),
|
213 |
+
'currency_pos' => edd_get_option( 'currency_position', 'before' ),
|
214 |
+
'currency_decimals' => edd_currency_decimal_filter(),
|
215 |
+
'new_media_ui' => apply_filters( 'edd_use_35_media_ui', 1 ),
|
216 |
+
'remove_text' => __( 'Remove', 'easy-digital-downloads' ),
|
217 |
+
'type_to_search' => sprintf( __( 'Type to search %s', 'easy-digital-downloads' ), edd_get_label_plural() ),
|
218 |
+
'quantities_enabled' => edd_item_quantities_enabled(),
|
219 |
+
'batch_export_no_class' => __( 'You must choose a method.', 'easy-digital-downloads' ),
|
220 |
+
'batch_export_no_reqs' => __( 'Required fields not completed.', 'easy-digital-downloads' ),
|
221 |
+
'reset_stats_warn' => __( 'Are you sure you want to reset your store? This process is <strong><em>not reversible</em></strong>. Please be sure you have a recent backup.', 'easy-digital-downloads' ),
|
222 |
+
'search_placeholder' => sprintf( __( 'Type to search all %s', 'easy-digital-downloads' ), edd_get_label_plural() ),
|
223 |
+
'search_placeholder_customer' => __( 'Type to search all Customers', 'easy-digital-downloads' ),
|
224 |
+
'search_placeholder_country' => __( 'Type to search all Countries', 'easy-digital-downloads' ),
|
225 |
+
'search_placeholder_state' => __( 'Type to search all States/Provinces', 'easy-digital-downloads' ),
|
226 |
+
'unsupported_browser' => __( 'We are sorry but your browser is not compatible with this kind of file upload. Please upgrade your browser.', 'easy-digital-downloads' ),
|
227 |
));
|
228 |
|
229 |
wp_enqueue_style( 'wp-color-picker' );
|
includes/shortcodes.php
CHANGED
@@ -173,12 +173,7 @@ add_shortcode( 'download_cart', 'edd_cart_shortcode' );
|
|
173 |
* @return string
|
174 |
*/
|
175 |
function edd_login_form_shortcode( $atts, $content = null ) {
|
176 |
-
$redirect
|
177 |
-
$purchase_history = edd_get_option( 'purchase_history_page', 0 );
|
178 |
-
|
179 |
-
if ( ! empty( $purchase_history ) ) {
|
180 |
-
$redirect = get_permalink( $purchase_history );
|
181 |
-
}
|
182 |
|
183 |
extract( shortcode_atts( array(
|
184 |
'redirect' => $redirect
|
@@ -186,7 +181,23 @@ function edd_login_form_shortcode( $atts, $content = null ) {
|
|
186 |
);
|
187 |
|
188 |
if ( empty( $redirect ) ) {
|
189 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
}
|
191 |
|
192 |
return edd_login_form( $redirect );
|
173 |
* @return string
|
174 |
*/
|
175 |
function edd_login_form_shortcode( $atts, $content = null ) {
|
176 |
+
$redirect = '';
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
extract( shortcode_atts( array(
|
179 |
'redirect' => $redirect
|
181 |
);
|
182 |
|
183 |
if ( empty( $redirect ) ) {
|
184 |
+
$login_redirect_page = edd_get_option( 'login_redirect_page', '' );
|
185 |
+
|
186 |
+
if ( ! empty( $login_redirect_page ) ) {
|
187 |
+
$redirect = get_permalink( $login_redirect_page );
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
if ( empty( $redirect ) ) {
|
192 |
+
$purchase_history = edd_get_option( 'purchase_history_page', 0 );
|
193 |
+
|
194 |
+
if ( ! empty( $purchase_history ) ) {
|
195 |
+
$redirect = get_permalink( $purchase_history );
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
if ( empty( $redirect ) ) {
|
200 |
+
$redirect = home_url();
|
201 |
}
|
202 |
|
203 |
return edd_login_form( $redirect );
|
includes/tax-functions.php
CHANGED
@@ -64,6 +64,8 @@ function edd_get_tax_rate( $country = false, $state = false ) {
|
|
64 |
if( empty( $state ) ) {
|
65 |
if( ! empty( $_POST['state'] ) ) {
|
66 |
$state = $_POST['state'];
|
|
|
|
|
67 |
} elseif( is_user_logged_in() && ! empty( $user_address ) ) {
|
68 |
$state = $user_address['state'];
|
69 |
}
|
64 |
if( empty( $state ) ) {
|
65 |
if( ! empty( $_POST['state'] ) ) {
|
66 |
$state = $_POST['state'];
|
67 |
+
} elseif( ! empty( $_POST['card_state'] ) ) {
|
68 |
+
$state = $_POST['card_state'];
|
69 |
} elseif( is_user_logged_in() && ! empty( $user_address ) ) {
|
70 |
$state = $user_address['state'];
|
71 |
}
|
languages/easy-digital-downloads-af.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-de_DE.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-en_AU.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-en_CA.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-en_GB.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-en_NZ.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-es_ES.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-fr_FR.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-it_IT.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-nl_NL.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-pt_PT.mo
CHANGED
Binary file
|
languages/easy-digital-downloads.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Easy Digital Downloads 2.6.
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
-
"POT-Creation-Date: 2016-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -91,7 +91,7 @@ msgstr ""
|
|
91 |
#: includes/admin/upgrades/upgrade-functions.php:1103
|
92 |
#: includes/api/class-edd-api.php:1904 includes/api/class-edd-api.php:1909
|
93 |
#: includes/api/class-edd-api.php:1921 includes/api/class-edd-api.php:1923
|
94 |
-
#: includes/cart/functions.php:
|
95 |
#: includes/class-edd-license-handler.php:304
|
96 |
#: includes/deprecated-functions.php:517 includes/deprecated-functions.php:532
|
97 |
#: includes/deprecated-functions.php:542 includes/download-functions.php:1228
|
@@ -635,8 +635,8 @@ msgstr ""
|
|
635 |
|
636 |
#: includes/admin/customers/customers.php:306
|
637 |
#: includes/admin/customers/customers.php:588
|
638 |
-
#: includes/admin/payments/view-order-details.php:
|
639 |
-
#: includes/admin/thickbox.php:131 includes/class-edd-html-elements.php:
|
640 |
msgid "Cancel"
|
641 |
msgstr ""
|
642 |
|
@@ -2149,58 +2149,62 @@ msgstr ""
|
|
2149 |
msgid "No %s included with this purchase"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
-
#: includes/admin/payments/view-order-details.php:
|
|
|
|
|
|
|
|
|
2153 |
msgid "View Customer Details"
|
2154 |
msgstr ""
|
2155 |
|
2156 |
-
#: includes/admin/payments/view-order-details.php:
|
2157 |
msgid "New Customer"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
-
#: includes/admin/payments/view-order-details.php:
|
2161 |
msgid "Name:"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
-
#: includes/admin/payments/view-order-details.php:
|
2165 |
msgid "Email:"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
-
#: includes/admin/payments/view-order-details.php:
|
2169 |
msgid "Click \"Save Payment\" to create new customer"
|
2170 |
msgstr ""
|
2171 |
|
2172 |
-
#: includes/admin/payments/view-order-details.php:
|
2173 |
#: includes/checkout/template.php:329
|
2174 |
msgid "Billing Address"
|
2175 |
msgstr ""
|
2176 |
|
2177 |
-
#: includes/admin/payments/view-order-details.php:
|
2178 |
msgid "Street Address Line 1:"
|
2179 |
msgstr ""
|
2180 |
|
2181 |
-
#: includes/admin/payments/view-order-details.php:
|
2182 |
msgid "Street Address Line 2:"
|
2183 |
msgstr ""
|
2184 |
|
2185 |
-
#: includes/admin/payments/view-order-details.php:
|
2186 |
#: includes/admin/settings/register-settings.php:307
|
2187 |
msgid "Select a country"
|
2188 |
msgstr ""
|
2189 |
|
2190 |
-
#: includes/admin/payments/view-order-details.php:
|
2191 |
#: includes/admin/settings/register-settings.php:315
|
2192 |
msgid "Select a state"
|
2193 |
msgstr ""
|
2194 |
|
2195 |
-
#: includes/admin/payments/view-order-details.php:
|
2196 |
msgid "Payment Notes"
|
2197 |
msgstr ""
|
2198 |
|
2199 |
-
#: includes/admin/payments/view-order-details.php:
|
2200 |
msgid "No payment notes"
|
2201 |
msgstr ""
|
2202 |
|
2203 |
-
#: includes/admin/payments/view-order-details.php:
|
2204 |
msgid "Add Note"
|
2205 |
msgstr ""
|
2206 |
|
@@ -5106,32 +5110,32 @@ msgstr ""
|
|
5106 |
msgid "You do not have permission to %s API keys for this user"
|
5107 |
msgstr ""
|
5108 |
|
5109 |
-
#: includes/cart/functions.php:
|
5110 |
msgid "includes %s tax"
|
5111 |
msgstr ""
|
5112 |
|
5113 |
-
#: includes/cart/functions.php:
|
5114 |
msgid "excludes %s tax"
|
5115 |
msgstr ""
|
5116 |
|
5117 |
-
#: includes/cart/functions.php:
|
5118 |
#: templates/shortcode-profile-editor.php:22
|
5119 |
msgid "Success"
|
5120 |
msgstr ""
|
5121 |
|
5122 |
-
#: includes/cart/functions.php:
|
5123 |
msgid "Cart saved successfully. You can restore your cart using this URL:"
|
5124 |
msgstr ""
|
5125 |
|
5126 |
-
#: includes/cart/functions.php:
|
5127 |
msgid "Cart restoration failed. Invalid token."
|
5128 |
msgstr ""
|
5129 |
|
5130 |
-
#: includes/cart/functions.php:
|
5131 |
msgid "The cart cannot be restored. Invalid token."
|
5132 |
msgstr ""
|
5133 |
|
5134 |
-
#: includes/cart/functions.php:
|
5135 |
msgid "Cart restored successfully."
|
5136 |
msgstr ""
|
5137 |
|
@@ -5647,8 +5651,8 @@ msgstr ""
|
|
5647 |
msgid " Product: %s - %s"
|
5648 |
msgstr ""
|
5649 |
|
5650 |
-
#: includes/class-edd-cli.php:419 includes/class-edd-html-elements.php:
|
5651 |
-
#: includes/shortcodes.php:
|
5652 |
msgid "No discounts found"
|
5653 |
msgstr ""
|
5654 |
|
@@ -5752,11 +5756,11 @@ msgstr ""
|
|
5752 |
msgid "No customer attached"
|
5753 |
msgstr ""
|
5754 |
|
5755 |
-
#: includes/class-edd-html-elements.php:
|
5756 |
msgid "Select a discount"
|
5757 |
msgstr ""
|
5758 |
|
5759 |
-
#: includes/class-edd-html-elements.php:
|
5760 |
msgid "Enter username"
|
5761 |
msgstr ""
|
5762 |
|
@@ -5786,7 +5790,7 @@ msgid "The total earnings for the specified product"
|
|
5786 |
msgstr ""
|
5787 |
|
5788 |
#: includes/class-edd-register-meta.php:89
|
5789 |
-
msgid "The
|
5790 |
msgstr ""
|
5791 |
|
5792 |
#: includes/class-edd-register-meta.php:103
|
@@ -5826,7 +5830,7 @@ msgid "The Customer ID associated with the payment."
|
|
5826 |
msgstr ""
|
5827 |
|
5828 |
#: includes/class-edd-register-meta.php:231
|
5829 |
-
msgid "The User ID
|
5830 |
msgstr ""
|
5831 |
|
5832 |
#: includes/class-edd-register-meta.php:245
|
@@ -5842,7 +5846,7 @@ msgid "The purchase total for this payment."
|
|
5842 |
msgstr ""
|
5843 |
|
5844 |
#: includes/class-edd-register-meta.php:287
|
5845 |
-
msgid "
|
5846 |
msgstr ""
|
5847 |
|
5848 |
#: includes/class-edd-register-meta.php:301
|
@@ -7436,37 +7440,45 @@ msgstr ""
|
|
7436 |
msgid "Type to search all %s"
|
7437 |
msgstr ""
|
7438 |
|
7439 |
-
#: includes/scripts.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7440 |
msgid ""
|
7441 |
"We are sorry but your browser is not compatible with this kind of file "
|
7442 |
"upload. Please upgrade your browser."
|
7443 |
msgstr ""
|
7444 |
|
7445 |
-
#: includes/shortcodes.php:
|
7446 |
msgid "Purchase All Items"
|
7447 |
msgstr ""
|
7448 |
|
7449 |
-
#: includes/shortcodes.php:
|
7450 |
msgid "Sorry, trouble retrieving payment receipt."
|
7451 |
msgstr ""
|
7452 |
|
7453 |
-
#: includes/shortcodes.php:
|
7454 |
msgid "You must be logged in to view this payment receipt."
|
7455 |
msgstr ""
|
7456 |
|
7457 |
-
#: includes/shortcodes.php:
|
7458 |
msgid "The passwords you entered do not match. Please try again."
|
7459 |
msgstr ""
|
7460 |
|
7461 |
-
#: includes/shortcodes.php:
|
7462 |
msgid "The email you entered is invalid. Please enter a valid email."
|
7463 |
msgstr ""
|
7464 |
|
7465 |
-
#: includes/shortcodes.php:
|
7466 |
msgid "The email you entered belongs to another user. Please use another."
|
7467 |
msgstr ""
|
7468 |
|
7469 |
-
#: includes/shortcodes.php:
|
7470 |
msgid "Error removing email address from profile. Please try again later."
|
7471 |
msgstr ""
|
7472 |
|
@@ -7860,22 +7872,22 @@ msgstr ""
|
|
7860 |
msgid "The easiest way to sell digital products with WordPress."
|
7861 |
msgstr ""
|
7862 |
|
7863 |
-
#: includes/admin/payments/view-order-details.php:
|
7864 |
msgctxt "Address City"
|
7865 |
msgid "City:"
|
7866 |
msgstr ""
|
7867 |
|
7868 |
-
#: includes/admin/payments/view-order-details.php:
|
7869 |
msgctxt "Zip / Postal code of address"
|
7870 |
msgid "Zip / Postal Code:"
|
7871 |
msgstr ""
|
7872 |
|
7873 |
-
#: includes/admin/payments/view-order-details.php:
|
7874 |
msgctxt "Address country"
|
7875 |
msgid "Country:"
|
7876 |
msgstr ""
|
7877 |
|
7878 |
-
#: includes/admin/payments/view-order-details.php:
|
7879 |
msgctxt "State / province of address"
|
7880 |
msgid "State / Province:"
|
7881 |
msgstr ""
|
@@ -7895,17 +7907,17 @@ msgctxt "Apply discount at checkout"
|
|
7895 |
msgid "Apply"
|
7896 |
msgstr ""
|
7897 |
|
7898 |
-
#: includes/class-edd-html-elements.php:
|
7899 |
msgctxt "plural: Example: \"All Categories\""
|
7900 |
msgid "All %s"
|
7901 |
msgstr ""
|
7902 |
|
7903 |
-
#: includes/class-edd-html-elements.php:
|
7904 |
msgctxt "all dropdown items"
|
7905 |
msgid "All"
|
7906 |
msgstr ""
|
7907 |
|
7908 |
-
#: includes/class-edd-html-elements.php:
|
7909 |
msgctxt "no dropdown items"
|
7910 |
msgid "None"
|
7911 |
msgstr ""
|
@@ -7915,7 +7927,7 @@ msgctxt "download post type name"
|
|
7915 |
msgid "%2$s"
|
7916 |
msgstr ""
|
7917 |
|
7918 |
-
#: includes/shortcodes.php:
|
7919 |
msgctxt "download post type name"
|
7920 |
msgid "No %s found"
|
7921 |
msgstr ""
|
2 |
# This file is distributed under the same license as the Easy Digital Downloads package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Easy Digital Downloads 2.6.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
+
"POT-Creation-Date: 2016-08-01 15:37:53+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
91 |
#: includes/admin/upgrades/upgrade-functions.php:1103
|
92 |
#: includes/api/class-edd-api.php:1904 includes/api/class-edd-api.php:1909
|
93 |
#: includes/api/class-edd-api.php:1921 includes/api/class-edd-api.php:1923
|
94 |
+
#: includes/cart/functions.php:1202 includes/cart/functions.php:1219
|
95 |
#: includes/class-edd-license-handler.php:304
|
96 |
#: includes/deprecated-functions.php:517 includes/deprecated-functions.php:532
|
97 |
#: includes/deprecated-functions.php:542 includes/download-functions.php:1228
|
635 |
|
636 |
#: includes/admin/customers/customers.php:306
|
637 |
#: includes/admin/customers/customers.php:588
|
638 |
+
#: includes/admin/payments/view-order-details.php:462
|
639 |
+
#: includes/admin/thickbox.php:131 includes/class-edd-html-elements.php:587
|
640 |
msgid "Cancel"
|
641 |
msgstr ""
|
642 |
|
2149 |
msgid "No %s included with this purchase"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
+
#: includes/admin/payments/view-order-details.php:432 includes/scripts.php:223
|
2153 |
+
msgid "Type to search all Customers"
|
2154 |
+
msgstr ""
|
2155 |
+
|
2156 |
+
#: includes/admin/payments/view-order-details.php:444
|
2157 |
msgid "View Customer Details"
|
2158 |
msgstr ""
|
2159 |
|
2160 |
+
#: includes/admin/payments/view-order-details.php:447
|
2161 |
msgid "New Customer"
|
2162 |
msgstr ""
|
2163 |
|
2164 |
+
#: includes/admin/payments/view-order-details.php:453
|
2165 |
msgid "Name:"
|
2166 |
msgstr ""
|
2167 |
|
2168 |
+
#: includes/admin/payments/view-order-details.php:457
|
2169 |
msgid "Email:"
|
2170 |
msgstr ""
|
2171 |
|
2172 |
+
#: includes/admin/payments/view-order-details.php:465
|
2173 |
msgid "Click \"Save Payment\" to create new customer"
|
2174 |
msgstr ""
|
2175 |
|
2176 |
+
#: includes/admin/payments/view-order-details.php:480
|
2177 |
#: includes/checkout/template.php:329
|
2178 |
msgid "Billing Address"
|
2179 |
msgstr ""
|
2180 |
|
2181 |
+
#: includes/admin/payments/view-order-details.php:490
|
2182 |
msgid "Street Address Line 1:"
|
2183 |
msgstr ""
|
2184 |
|
2185 |
+
#: includes/admin/payments/view-order-details.php:494
|
2186 |
msgid "Street Address Line 2:"
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: includes/admin/payments/view-order-details.php:522
|
2190 |
#: includes/admin/settings/register-settings.php:307
|
2191 |
msgid "Select a country"
|
2192 |
msgstr ""
|
2193 |
|
2194 |
+
#: includes/admin/payments/view-order-details.php:539
|
2195 |
#: includes/admin/settings/register-settings.php:315
|
2196 |
msgid "Select a state"
|
2197 |
msgstr ""
|
2198 |
|
2199 |
+
#: includes/admin/payments/view-order-details.php:560
|
2200 |
msgid "Payment Notes"
|
2201 |
msgstr ""
|
2202 |
|
2203 |
+
#: includes/admin/payments/view-order-details.php:575
|
2204 |
msgid "No payment notes"
|
2205 |
msgstr ""
|
2206 |
|
2207 |
+
#: includes/admin/payments/view-order-details.php:581
|
2208 |
msgid "Add Note"
|
2209 |
msgstr ""
|
2210 |
|
5110 |
msgid "You do not have permission to %s API keys for this user"
|
5111 |
msgstr ""
|
5112 |
|
5113 |
+
#: includes/cart/functions.php:455
|
5114 |
msgid "includes %s tax"
|
5115 |
msgstr ""
|
5116 |
|
5117 |
+
#: includes/cart/functions.php:457
|
5118 |
msgid "excludes %s tax"
|
5119 |
msgstr ""
|
5120 |
|
5121 |
+
#: includes/cart/functions.php:1164 includes/cart/functions.php:1232
|
5122 |
#: templates/shortcode-profile-editor.php:22
|
5123 |
msgid "Success"
|
5124 |
msgstr ""
|
5125 |
|
5126 |
+
#: includes/cart/functions.php:1165
|
5127 |
msgid "Cart saved successfully. You can restore your cart using this URL:"
|
5128 |
msgstr ""
|
5129 |
|
5130 |
+
#: includes/cart/functions.php:1202 includes/cart/functions.php:1219
|
5131 |
msgid "Cart restoration failed. Invalid token."
|
5132 |
msgstr ""
|
5133 |
|
5134 |
+
#: includes/cart/functions.php:1210 includes/cart/functions.php:1222
|
5135 |
msgid "The cart cannot be restored. Invalid token."
|
5136 |
msgstr ""
|
5137 |
|
5138 |
+
#: includes/cart/functions.php:1232
|
5139 |
msgid "Cart restored successfully."
|
5140 |
msgstr ""
|
5141 |
|
5651 |
msgid " Product: %s - %s"
|
5652 |
msgstr ""
|
5653 |
|
5654 |
+
#: includes/class-edd-cli.php:419 includes/class-edd-html-elements.php:209
|
5655 |
+
#: includes/shortcodes.php:270
|
5656 |
msgid "No discounts found"
|
5657 |
msgstr ""
|
5658 |
|
5756 |
msgid "No customer attached"
|
5757 |
msgstr ""
|
5758 |
|
5759 |
+
#: includes/class-edd-html-elements.php:217
|
5760 |
msgid "Select a discount"
|
5761 |
msgstr ""
|
5762 |
|
5763 |
+
#: includes/class-edd-html-elements.php:572
|
5764 |
msgid "Enter username"
|
5765 |
msgstr ""
|
5766 |
|
5790 |
msgstr ""
|
5791 |
|
5792 |
#: includes/class-edd-register-meta.php:89
|
5793 |
+
msgid "The number of sales for the specified product."
|
5794 |
msgstr ""
|
5795 |
|
5796 |
#: includes/class-edd-register-meta.php:103
|
5830 |
msgstr ""
|
5831 |
|
5832 |
#: includes/class-edd-register-meta.php:231
|
5833 |
+
msgid "The User ID associated with the payment."
|
5834 |
msgstr ""
|
5835 |
|
5836 |
#: includes/class-edd-register-meta.php:245
|
5846 |
msgstr ""
|
5847 |
|
5848 |
#: includes/class-edd-register-meta.php:287
|
5849 |
+
msgid "Identifies if the purchase was made in Test or Live mode."
|
5850 |
msgstr ""
|
5851 |
|
5852 |
#: includes/class-edd-register-meta.php:301
|
7440 |
msgid "Type to search all %s"
|
7441 |
msgstr ""
|
7442 |
|
7443 |
+
#: includes/scripts.php:224
|
7444 |
+
msgid "Type to search all Countries"
|
7445 |
+
msgstr ""
|
7446 |
+
|
7447 |
+
#: includes/scripts.php:225
|
7448 |
+
msgid "Type to search all States/Provinces"
|
7449 |
+
msgstr ""
|
7450 |
+
|
7451 |
+
#: includes/scripts.php:226
|
7452 |
msgid ""
|
7453 |
"We are sorry but your browser is not compatible with this kind of file "
|
7454 |
"upload. Please upgrade your browser."
|
7455 |
msgstr ""
|
7456 |
|
7457 |
+
#: includes/shortcodes.php:294
|
7458 |
msgid "Purchase All Items"
|
7459 |
msgstr ""
|
7460 |
|
7461 |
+
#: includes/shortcodes.php:684
|
7462 |
msgid "Sorry, trouble retrieving payment receipt."
|
7463 |
msgstr ""
|
7464 |
|
7465 |
+
#: includes/shortcodes.php:719
|
7466 |
msgid "You must be logged in to view this payment receipt."
|
7467 |
msgstr ""
|
7468 |
|
7469 |
+
#: includes/shortcodes.php:854
|
7470 |
msgid "The passwords you entered do not match. Please try again."
|
7471 |
msgstr ""
|
7472 |
|
7473 |
+
#: includes/shortcodes.php:864
|
7474 |
msgid "The email you entered is invalid. Please enter a valid email."
|
7475 |
msgstr ""
|
7476 |
|
7477 |
+
#: includes/shortcodes.php:869
|
7478 |
msgid "The email you entered belongs to another user. Please use another."
|
7479 |
msgstr ""
|
7480 |
|
7481 |
+
#: includes/shortcodes.php:944
|
7482 |
msgid "Error removing email address from profile. Please try again later."
|
7483 |
msgstr ""
|
7484 |
|
7872 |
msgid "The easiest way to sell digital products with WordPress."
|
7873 |
msgstr ""
|
7874 |
|
7875 |
+
#: includes/admin/payments/view-order-details.php:501
|
7876 |
msgctxt "Address City"
|
7877 |
msgid "City:"
|
7878 |
msgstr ""
|
7879 |
|
7880 |
+
#: includes/admin/payments/view-order-details.php:506
|
7881 |
msgctxt "Zip / Postal code of address"
|
7882 |
msgid "Zip / Postal Code:"
|
7883 |
msgstr ""
|
7884 |
|
7885 |
+
#: includes/admin/payments/view-order-details.php:513
|
7886 |
msgctxt "Address country"
|
7887 |
msgid "Country:"
|
7888 |
msgstr ""
|
7889 |
|
7890 |
+
#: includes/admin/payments/view-order-details.php:528
|
7891 |
msgctxt "State / province of address"
|
7892 |
msgid "State / Province:"
|
7893 |
msgstr ""
|
7907 |
msgid "Apply"
|
7908 |
msgstr ""
|
7909 |
|
7910 |
+
#: includes/class-edd-html-elements.php:245
|
7911 |
msgctxt "plural: Example: \"All Categories\""
|
7912 |
msgid "All %s"
|
7913 |
msgstr ""
|
7914 |
|
7915 |
+
#: includes/class-edd-html-elements.php:335
|
7916 |
msgctxt "all dropdown items"
|
7917 |
msgid "All"
|
7918 |
msgstr ""
|
7919 |
|
7920 |
+
#: includes/class-edd-html-elements.php:336
|
7921 |
msgctxt "no dropdown items"
|
7922 |
msgid "None"
|
7923 |
msgstr ""
|
7927 |
msgid "%2$s"
|
7928 |
msgstr ""
|
7929 |
|
7930 |
+
#: includes/shortcodes.php:638
|
7931 |
msgctxt "download post type name"
|
7932 |
msgid "No %s found"
|
7933 |
msgstr ""
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link: https://pippinsplugins.com/support-the-site
|
|
6 |
Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
|
7 |
Requires at least: 4.0
|
8 |
Tested up to: 4.7
|
9 |
-
Stable Tag: 2.6.
|
10 |
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
@@ -51,34 +51,7 @@ With extensions for [MailChimp](https://easydigitaldownloads.com/downloads/mail-
|
|
51 |
|
52 |
**Languages**
|
53 |
|
54 |
-
Easy Digital Downloads has been translated into
|
55 |
-
|
56 |
-
1. English (and British English)
|
57 |
-
2. German
|
58 |
-
3. Spanish
|
59 |
-
4. French
|
60 |
-
5. Italian
|
61 |
-
6. Dutch
|
62 |
-
7. European Portuguese
|
63 |
-
8. Brazilian Portuguese
|
64 |
-
9. Turkish
|
65 |
-
10. Arabic
|
66 |
-
11. Polish
|
67 |
-
12. Russian
|
68 |
-
13. Czech
|
69 |
-
14. Japanese
|
70 |
-
15. Farsi
|
71 |
-
16. Finnish
|
72 |
-
17. Hebrew
|
73 |
-
18. Persian
|
74 |
-
19. Finnish
|
75 |
-
20. Slovak
|
76 |
-
21. Swedish
|
77 |
-
22. Romanian
|
78 |
-
23. Hungarian
|
79 |
-
24. Norwegian
|
80 |
-
25. Khmer
|
81 |
-
26. Lithuanian
|
82 |
|
83 |
Would you like to help translate the plugin into more languages? [Join our WP-Translations Community](http://docs.easydigitaldownloads.com/article/1023-translating-easy-digital-downloads).
|
84 |
|
@@ -214,6 +187,14 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
|
|
214 |
|
215 |
== Changelog ==
|
216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
= 2.6.5, July 25, 2016 =
|
218 |
* Fix: Incorrect parameters passed to edd_is_checkout()
|
219 |
* Fix: Some records skipped during CSV import
|
6 |
Tags: download, downloads, e-store, eshop, digital downloads, e-commerce, wp-ecommerce, wp ecommerce
|
7 |
Requires at least: 4.0
|
8 |
Tested up to: 4.7
|
9 |
+
Stable Tag: 2.6.6
|
10 |
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
51 |
|
52 |
**Languages**
|
53 |
|
54 |
+
Easy Digital Downloads has been translated into more than two dozen languages. The complete list of languages can be found in our [FAQ](http://docs.easydigitaldownloads.com/article/1082-what-spoken-languages-does-easy-digital-downloads-support).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
Would you like to help translate the plugin into more languages? [Join our WP-Translations Community](http://docs.easydigitaldownloads.com/article/1023-translating-easy-digital-downloads).
|
57 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 2.6.6, August 1, 2016 =
|
191 |
+
* Fix: Discount codes being marked as inactive
|
192 |
+
* Fix: Incorrect state/province used in tax calculations in certain scenarios
|
193 |
+
* Fix: Incorrect placeholder for Select Customer drop down
|
194 |
+
* Fix: Incorrect redirect URL for [edd_login] shortcode
|
195 |
+
* Fix: Spelling errors in internal documentation
|
196 |
+
* New: Added $items parameter to edd_post_add_to_cart action
|
197 |
+
|
198 |
= 2.6.5, July 25, 2016 =
|
199 |
* Fix: Incorrect parameters passed to edd_is_checkout()
|
200 |
* Fix: Some records skipped during CSV import
|