Version Description
Download this release
Release Info
Developer | mordauk |
Plugin | Easy Digital Downloads |
Version | 2.6.3 |
Comparing to | |
See all releases |
Code changes from version 2.6.2 to 2.6.3
- assets/js/admin-scripts.js +8 -1
- assets/js/admin-scripts.min.js +2 -2
- assets/js/edd-ajax.min.js +1 -1
- assets/js/edd-checkout-global.js +3 -1
- assets/js/edd-checkout-global.min.js +1 -1
- easy-digital-downloads.php +3 -3
- includes/EDD_SL_Plugin_Updater.php +29 -27
- includes/admin/import/class-batch-import-payments.php +4 -4
- includes/admin/import/class-batch-import.php +1 -1
- includes/discount-functions.php +1 -1
- includes/download-functions.php +8 -8
- includes/gateways/functions.php +1 -1
- includes/misc-functions.php +6 -0
- languages/easy-digital-downloads-af.mo +0 -0
- languages/easy-digital-downloads-am.mo +0 -0
- languages/easy-digital-downloads-an.mo +0 -0
- languages/easy-digital-downloads-ar.mo +0 -0
- languages/easy-digital-downloads-ary.mo +0 -0
- languages/easy-digital-downloads-az.mo +0 -0
- languages/easy-digital-downloads-azb.mo +0 -0
- languages/easy-digital-downloads-bel.mo +0 -0
- languages/easy-digital-downloads-bg_BG.mo +0 -0
- languages/easy-digital-downloads-bn_BD.mo +0 -0
- languages/easy-digital-downloads-bs_BA.mo +0 -0
- languages/easy-digital-downloads-ca.mo +0 -0
- languages/easy-digital-downloads-ceb.mo +0 -0
- languages/easy-digital-downloads-cs_CZ.mo +0 -0
- languages/easy-digital-downloads-cy.mo +0 -0
- languages/easy-digital-downloads-da_DK.mo +0 -0
- languages/easy-digital-downloads-de_CH.mo +0 -0
- languages/easy-digital-downloads-de_DE.mo +0 -0
- languages/easy-digital-downloads-el.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-en_ZA.mo +0 -0
- languages/easy-digital-downloads-eo.mo +0 -0
- languages/easy-digital-downloads-es_AR.mo +0 -0
- languages/easy-digital-downloads-es_CL.mo +0 -0
- languages/easy-digital-downloads-es_ES.mo +0 -0
- languages/easy-digital-downloads-es_MX.mo +0 -0
- languages/easy-digital-downloads-es_PE.mo +0 -0
- languages/easy-digital-downloads-es_VE.mo +0 -0
- languages/easy-digital-downloads-et.mo +0 -0
- languages/easy-digital-downloads-eu.mo +0 -0
- languages/easy-digital-downloads-fa_IR.mo +0 -0
- languages/easy-digital-downloads-fi.mo +0 -0
- languages/easy-digital-downloads-fo.mo +0 -0
- languages/easy-digital-downloads-fr_CA.mo +0 -0
- languages/easy-digital-downloads-fr_FR.mo +0 -0
- languages/easy-digital-downloads-fy.mo +0 -0
- languages/easy-digital-downloads-ga.mo +0 -0
- languages/easy-digital-downloads-gd.mo +0 -0
- languages/easy-digital-downloads-gl_ES.mo +0 -0
- languages/easy-digital-downloads-he_IL.mo +0 -0
- languages/easy-digital-downloads-hi_IN.mo +0 -0
- languages/easy-digital-downloads-hr.mo +0 -0
- languages/easy-digital-downloads-hu_HU.mo +0 -0
- languages/easy-digital-downloads-id_ID.mo +0 -0
- languages/easy-digital-downloads-is_IS.mo +0 -0
- languages/easy-digital-downloads-it_IT.mo +0 -0
- languages/easy-digital-downloads-ja.mo +0 -0
- languages/easy-digital-downloads-jv_ID.mo +0 -0
- languages/easy-digital-downloads-ka_GE.mo +0 -0
- languages/easy-digital-downloads-kk.mo +0 -0
- languages/easy-digital-downloads-km.mo +0 -0
- languages/easy-digital-downloads-kn.mo +0 -0
- languages/easy-digital-downloads-ko_KR.mo +0 -0
- languages/easy-digital-downloads-ky_KY.mo +0 -0
- languages/easy-digital-downloads-lo.mo +0 -0
- languages/easy-digital-downloads-lt_LT.mo +0 -0
- languages/easy-digital-downloads-lv.mo +0 -0
- languages/easy-digital-downloads-mg_MG.mo +0 -0
- languages/easy-digital-downloads-mk_MK.mo +0 -0
- languages/easy-digital-downloads-mn.mo +0 -0
- languages/easy-digital-downloads-ms_MY.mo +0 -0
- languages/easy-digital-downloads-my_MM.mo +0 -0
- languages/easy-digital-downloads-nb_NO.mo +0 -0
- languages/easy-digital-downloads-ne_NP.mo +0 -0
- languages/easy-digital-downloads-nl_NL.mo +0 -0
- languages/easy-digital-downloads-nn_NO.mo +0 -0
- languages/easy-digital-downloads-os.mo +0 -0
- languages/easy-digital-downloads-pa_IN.mo +0 -0
- languages/easy-digital-downloads-pl_PL.mo +0 -0
- languages/easy-digital-downloads-ps.mo +0 -0
- languages/easy-digital-downloads-pt_BR.mo +0 -0
- languages/easy-digital-downloads-pt_PT.mo +0 -0
- languages/easy-digital-downloads-ro_RO.mo +0 -0
- languages/easy-digital-downloads-ru_RU.mo +0 -0
- languages/easy-digital-downloads-si_LK.mo +0 -0
- languages/easy-digital-downloads-sk_SK.mo +0 -0
- languages/easy-digital-downloads-sl_SI.mo +0 -0
- languages/easy-digital-downloads-snd.mo +0 -0
- languages/easy-digital-downloads-so_SO.mo +0 -0
- languages/easy-digital-downloads-sq.mo +0 -0
- languages/easy-digital-downloads-sr_RS.mo +0 -0
- languages/easy-digital-downloads-su_ID.mo +0 -0
- languages/easy-digital-downloads-sv_SE.mo +0 -0
- languages/easy-digital-downloads-sw.mo +0 -0
- languages/easy-digital-downloads-ta_LK.mo +0 -0
- languages/easy-digital-downloads-te.mo +0 -0
- languages/easy-digital-downloads-th.mo +0 -0
- languages/easy-digital-downloads-tl.mo +0 -0
- languages/easy-digital-downloads-tr_TR.mo +0 -0
- languages/easy-digital-downloads-ug_CN.mo +0 -0
- languages/easy-digital-downloads-uk.mo +0 -0
- languages/easy-digital-downloads-ur.mo +0 -0
- languages/easy-digital-downloads-vi.mo +0 -0
- languages/easy-digital-downloads-zh_CN.mo +0 -0
- languages/easy-digital-downloads-zh_TW.mo +0 -0
- languages/easy-digital-downloads.pot +57 -57
- readme.txt +10 -1
assets/js/admin-scripts.js
CHANGED
@@ -1536,7 +1536,14 @@ jQuery(document).ready(function ($) {
|
|
1536 |
var select = $form.find('select.edd-import-csv-column');
|
1537 |
var row = select.parent().parent();
|
1538 |
var options = '';
|
1539 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1540 |
options += '<option value="' + value + '">' + value + '</option>';
|
1541 |
});
|
1542 |
|
1536 |
var select = $form.find('select.edd-import-csv-column');
|
1537 |
var row = select.parent().parent();
|
1538 |
var options = '';
|
1539 |
+
|
1540 |
+
var columns = response.data.columns.sort(function(a,b) {
|
1541 |
+
if( a < b ) return -1;
|
1542 |
+
if( a > b ) return 1;
|
1543 |
+
return 0;
|
1544 |
+
});
|
1545 |
+
|
1546 |
+
$.each( columns, function( key, value ) {
|
1547 |
options += '<option value="' + value + '">' + value + '</option>';
|
1548 |
});
|
1549 |
|
assets/js/admin-scripts.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
jQuery(document).ready(function(a){a(".edd-help-tip").tooltip({content:function(){return a(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}});var b={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone_repeatable:function(b){var c=highest=1;return b.parent().find("tr.edd_repeatable_row").each(function(){var b=a(this).data("key");parseInt(b)>highest&&(highest=b)}),c=highest+=1,clone=b.clone(),clone.find("select").each(function(){a(this).val(b.find('select[name="'+a(this).attr("name")+'"]').val())}),clone.removeClass("edd_add_blank"),clone.attr("data-key",c),clone.find("td input, td select, textarea").val(""),clone.find("input, select, textarea").each(function(){var b=a(this).attr("name"),d=a(this).attr("id");b&&(b=b.replace(/\[(\d+)\]/,"["+parseInt(c)+"]"),a(this).attr("name",b)),"undefined"!=typeof d&&(d=d.replace(/(\d+)/,parseInt(c)),a(this).attr("id",d))}),clone.find("span.edd_price_id").each(function(){a(this).text(parseInt(c))}),clone.find("span.edd_file_id").each(function(){a(this).text(parseInt(c))}),clone.find(".edd_repeatable_default_input").each(function(){a(this).val(parseInt(c)).removeAttr("checked")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),clone},add:function(){a(document.body).on("click",".submit .edd_add_repeatable",function(c){c.preventDefault();var d=a(this),e=d.parent().parent().prev("tr"),f=b.clone_repeatable(e);f.insertAfter(e).find("input, textarea, select").filter(":visible").eq(0).focus(),f.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}),f.find(".edd-select-chosen").css("width","100%"),f.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder)})},move:function(){a(".edd_repeatable_table tbody").sortable({handle:".edd_draghandle",items:".edd_repeatable_row",opacity:.6,cursor:"move",axis:"y",update:function(){var b=0;a(this).find("tr").each(function(){a(this).find("input.edd_repeatable_index").each(function(){a(this).val(b)}),b++})}})},remove:function(){a(document.body).on("click",".edd_remove_repeatable",function(b){b.preventDefault();var g,h,i,c=a(this).parent().parent("tr"),d=c.parent().find("tr").length-1,e=a(this).data("type"),f="tr.edd_repeatable_"+e+"s";if(g=a(this).is(".ui-sortable tr:first-child .edd_remove_repeatable:first-child")?c.next("tr"):c.prev("tr"),h=g.find("select, input, textarea, button").filter(":visible"),i=h.eq(0),"price"===e){var j=c.data("key");a('.edd_repeatable_condition_field option[value="'+j+'"]').remove()}if(d>1)a("input, select",c).val(""),c.fadeOut("fast").remove(),i.focus();else switch(e){case"price":alert(edd_vars.one_price_min);break;case"file":a("input, select",c).val("");break;default:alert(edd_vars.one_field_min)}a(f).each(function(b){a(this).find("input, select").each(function(){var c=a(this).attr("name");c=c.replace(/\[(\d+)\]/,"["+b+"]"),a(this).attr("name",c).attr("id",c)})})})},type:function(){a(document.body).on("change","#_edd_product_type",function(b){var c=a("#edd_products"),d=a("#edd_download_files"),e=a("#edd_download_limit_wrap");"bundle"===a(this).val()?(c.show(),d.hide(),e.hide()):(c.hide(),d.show(),e.show())})},prices:function(){a(document.body).on("change","#edd_variable_pricing",function(b){a(".edd_pricing_fields,.edd_repeatable_table .pricing").toggle()})},files:function(){if("undefined"==typeof wp||"1"!==edd_vars.new_media_ui)a(".edd_upload_file_button").length>0&&(window.formfield="",a(document.body).on("click",".edd_upload_file_button",function(b){if(b.preventDefault(),window.formfield=a(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 c="post_id="+edd_vars.post_id+"&";tb_show(edd_vars.add_new_download,"media-upload.php?"+c+"TB_iframe=true")}),window.edd_send_to_editor=window.send_to_editor,window.send_to_editor=function(b){window.formfield?(imgurl=a("a","<div>"+b+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(b),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1});else{var c;window.formfield="",a(document.body).on("click",".edd_upload_file_button",function(d){d.preventDefault();var e=a(this);return window.formfield=a(this).closest(".edd_repeatable_upload_wrapper"),c?void c.open():(c=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:e.data("uploader-title"),button:{text:e.data("uploader-button-text")},multiple:"0"==a(this).data("multiple")?!1:!0}),c.on("menu:render:default",function(a){var b={};a.unset("library-separator"),a.unset("gallery"),a.unset("featured-image"),a.unset("embed"),a.set(b)}),c.on("insert",function(){var a=c.state().get("selection");a.each(function(a,c){if(a=a.toJSON(),0===c)window.formfield.find(".edd_repeatable_attachment_id_field").val(a.id),window.formfield.find(".edd_repeatable_upload_field").val(a.url),window.formfield.find(".edd_repeatable_name_field").val(a.title);else{var d=window.formfield,e=b.clone_repeatable(d);e.find(".edd_repeatable_attachment_id_field").val(a.id),e.find(".edd_repeatable_upload_field").val(a.url),a.title.length>0?e.find(".edd_repeatable_name_field").val(a.title):e.find(".edd_repeatable_name_field").val(a.filename),e.insertAfter(d)}})}),void c.open())});var c;window.formfield=""}},updatePrices:function(){a("#edd_price_fields").on("keyup",".edd_variable_prices_name",function(){var b=a(this).parents("tr").data("key"),c=a(this).val(),d=a(".edd_repeatable_condition_field option[value="+b+"]");d.length>0?d.text(c):a(".edd_repeatable_condition_field").append(a("<option></option>").attr("value",b).text(c))})}};b.init();var c=a(".edd_datepicker");if(c.length>0){var d="mm/dd/yy";c.datepicker({dateFormat:d})}var e={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(){a('select[name="edd-payment-address[0][country]"]').change(function(){var b=a(this);return data={action:"edd_get_shop_states",country:b.val(),field_name:"edd-payment-address[0][state]"},a.post(ajaxurl,data,function(b){var c=a("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");"nostates"==b?c.replaceWith('<input type="text" name="edd-payment-address[0][state]" value="" class="edd-edit-toggles medium-text"/>'):c.replaceWith(b)}),!1})},remove_download:function(){a("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var b=a(document.body).find("#edd-purchased-files > .row").length;if(1===b)return alert(edd_vars.one_download_min),!1;if(confirm(edd_vars.delete_payment_download)){var c=a(this).data("key"),e=(a(".edd-payment-id").val(),a('input[name="edd-payment-details-downloads['+c+'][id]"]').val()),f=a('input[name="edd-payment-details-downloads['+c+'][price_id]"]').val(),g=a('input[name="edd-payment-details-downloads['+c+'][quantity]"]').val(),h=a('input[name="edd-payment-details-downloads['+c+'][amount]"]').val(),i=a('input[name="edd-payment-removed"]').val();i=a.parseJSON(i),i.length<1&&(i={});var j=[{id:e,price_id:f,quantity:g,amount:h,cart_index:c}];i[c]=j,a('input[name="edd-payment-removed"]').val(JSON.stringify(i)),a(this).parent().parent().parent().remove(),a("#edd-payment-downloads-changed").val(1),a(".edd-order-payment-recalc-totals").show()}return!1})},new_customer:function(){a("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(b){b.preventDefault(),a(".customer-info").toggle(),a(".new-customer").toggle();var c=a("#edd-new-customer");a(".new-customer").is(":visible")?c.val(1):c.val(0)})},add_download:function(){a("#edd-purchased-files").on("click","#edd-order-add-download",function(b){b.preventDefault();var c=a("#edd_order_download_select"),d=a("#edd-order-download-quantity"),e=a("#edd-order-download-amount"),f=a(".edd_price_options_select option:selected"),g=c.val(),h=c.find(":selected").text(),i=d.val(),j=e.val(),k=f.val(),l=f.text();if(1>g)return!1;if(j||(j=0),j=parseFloat(j),isNaN(j))return alert(edd_vars.numeric_item_price),!1;var m=j;if("1"===edd_vars.quantities_enabled){if(isNaN(parseInt(i)))return alert(edd_vars.numeric_quantity),!1;j*=i}j=j.toFixed(edd_vars.currency_decimals);var n=j+edd_vars.currency_sign;"before"===edd_vars.currency_pos&&(n=edd_vars.currency_sign+j),l&&(h=h+" - "+l);var o=a("#edd-purchased-files div.row").length,p=a("#edd-purchased-files div.row:last").clone();p.find(".download span").html('<a href="post.php?post='+g+'&action=edit"></a>'),p.find(".download span a").text(h),p.find(".price-text").text(n),p.find(".item-quantity").text(i),p.find(".item-price").text(edd_vars.currency_sign+(j/i).toFixed(edd_vars.currency_decimals)),p.find("input.edd-payment-details-download-id").val(g),p.find("input.edd-payment-details-download-price-id").val(k),p.find("input.edd-payment-details-download-item-price").val(m),p.find("input.edd-payment-details-download-amount").val(j),p.find("input.edd-payment-details-download-quantity").val(i),p.find("input.edd-payment-details-download-has-log").val(0),p.find("input").each(function(){var b=a(this).attr("name");b=b.replace(/\[(\d+)\]/,"["+parseInt(o)+"]"),a(this).attr("name",b).attr("id",b)}),a("#edd-payment-downloads-changed").val(1),a(p).insertAfter("#edd-purchased-files div.row:last"),a(".edd-order-payment-recalc-totals").show()})},recalculate_total:function(){a("#edd-order-recalc-total").on("click",function(b){b.preventDefault();var c=0,d=a("#edd-purchased-files .row .edd-payment-details-download-amount");d.length&&d.each(function(){c+=parseFloat(a(this).val())}),a(".edd-payment-fees").length&&a(".edd-payment-fees span.fee-amount").each(function(){c+=parseFloat(a(this).data("fee"))}),a("input[name=edd-payment-total]").val(c.toFixed(edd_vars.currency_decimals))})},variable_prices_check:function(){a("#edd-purchased-files").on("change","select#edd_order_download_select",function(){var b=a(this),c=b.val();if(parseInt(c)>0){var d={action:"edd_check_for_download_price_variations",download_id:c};a.ajax({type:"POST",data:d,url:ajaxurl,success:function(c){a(".edd_price_options_select").remove(),a(c).insertAfter(b.next())}}).fail(function(a){window.console&&window.console.log&&console.log(a)})}})},add_note:function(){a("#edd-add-payment-note").on("click",function(b){b.preventDefault();var c={action:"edd_insert_payment_note",payment_id:a(this).data("payment-id"),note:a("#edd-payment-note").val()};if(c.note)a.ajax({type:"POST",data:c,url:ajaxurl,success:function(b){a("#edd-payment-notes-inner").append(b),a(".edd-no-payment-notes").hide(),a("#edd-payment-note").val("")}}).fail(function(a){window.console&&window.console.log&&console.log(a)});else{var d=a("#edd-payment-note").css("border-color");a("#edd-payment-note").css("border-color","red"),setTimeout(function(){a("#edd-payment-note").css("border-color",d)},500)}})},remove_note:function(){a(document.body).on("click",".edd-delete-payment-note",function(b){if(b.preventDefault(),confirm(edd_vars.delete_payment_note)){var c={action:"edd_delete_payment_note",payment_id:a(this).data("payment-id"),note_id:a(this).data("note-id")};return a.ajax({type:"POST",data:c,url:ajaxurl,success:function(b){return a("#edd-payment-note-"+c.note_id).remove(),a(".edd-payment-note").length||a(".edd-no-payment-notes").show(),!1}}).fail(function(a){window.console&&window.console.log&&console.log(a)}),!0}})},resend_receipt:function(){a(document.body).on("click","#edd-resend-receipt",function(a){return confirm(edd_vars.resend_receipt)})},copy_download_link:function(){a(document.body).on("click",".edd-copy-download-link",function(b){b.preventDefault();var c=a(this),d={action:"edd_get_file_download_link",payment_id:a('input[name="edd_payment_id"]').val(),download_id:c.data("download-id"),price_id:c.data("price-id")};a.ajax({type:"POST",data:d,url:ajaxurl,success:function(b){return a("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+b+"</textarea>"),a("#edd-download-link-textarea").focus().select(),!1}}).fail(function(a){window.console&&window.console.log&&console.log(a)})})}};e.init();var f={init:function(){this.type_select(),this.product_requirements()},type_select:function(){a("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){a(".edd-amount-description").toggle()})},product_requirements:function(){a("#products").change(function(){var b=a("#edd-discount-product-conditions");a(this).val()?b.show():b.hide()})}};f.init();var g={init:function(){this.date_options(),this.customers_export()},date_options:function(){a("#edd-graphs-date-options").change(function(){var b=a(this),c=a("#edd-date-range-options");"other"===b.val()?c.show():c.hide()})},customers_export:function(){a("#edd_customer_export_download").change(function(){var b=a(this),c=a("option:selected",b).val(),d=a("#edd_customer_export_option");if("0"===b.val()?d.show():d.hide(),0!=parseInt(c)){var e={action:"edd_check_for_download_price_variations",download_id:c,all_prices:!0},f=a(".edd_price_options_select");a.post(ajaxurl,e,function(b){f.remove(),a("#edd_customer_export_download_chosen").after(b)})}else f.remove()})}};g.init();var h={init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var b=a(".edd-color-picker");if(b.length&&b.wpColorPicker(),"undefined"==typeof wp||"1"!==edd_vars.new_media_ui){var c=a(".edd_settings_upload_button");c.length>0&&(window.formfield="",a(document.body).on("click",c,function(b){b.preventDefault(),window.formfield=a(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(b){window.formfield?(imgurl=a("a","<div>"+b+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe_interval),tb_remove()):window.edd_send_to_editor(b),window.send_to_editor=window.edd_send_to_editor,window.formfield="",window.imagefield=!1})}else{var d;window.formfield="",a(document.body).on("click",".edd_settings_upload_button",function(b){b.preventDefault();var c=a(this);return window.formfield=a(this).parent().prev(),d?void d.open():(d=wp.media.frames.file_frame=wp.media({frame:"post",state:"insert",title:c.data("uploader_title"),button:{text:c.data("uploader_button_text")},multiple:!1}),d.on("menu:render:default",function(a){var b={};a.unset("library-separator"),a.unset("gallery"),a.unset("featured-image"),a.unset("embed"),a.set(b)}),d.on("insert",function(){var a=d.state().get("selection");a.each(function(a,b){a=a.toJSON(),window.formfield.val(a.url)})}),void d.open())});var d;window.formfield=""}},taxes:function(){var b=a("select.edd-no-states");b.length&&b.closest("tr").hide(),a('select[name="edd_settings[base_country]"]').change(function(){var b=a(this),c=b.closest("tr");return data={action:"edd_get_shop_states",country:a(this).val(),field_name:"edd_settings[base_state]"},a.post(ajaxurl,data,function(a){"nostates"==a?c.next().hide():(c.next().show(),c.next().find("select").replaceWith(a))}),!1}),a(document.body).on("change","#edd_tax_rates select.edd-tax-country",function(){var b=a(this);return data={action:"edd_get_shop_states",country:a(this).val(),field_name:b.attr("name").replace("country","state")},a.post(ajaxurl,data,function(a){if("nostates"==a){var c='<input type="text" name="'+data.field_name+'" value=""/>';b.parent().next().find("select").replaceWith(c)}else b.parent().next().find("input,select").show(),b.parent().next().find("input,select").replaceWith(a)}),!1}),a("#edd_add_tax_rate").on("click",function(){var b=a("#edd_tax_rates tr:last"),c=b.clone(),d=b.parent().find("tr").length;return c.find("td input").not(":input[type=checkbox]").val(""),c.find('td [type="checkbox"]').attr("checked",!1),c.find("input, select").each(function(){var b=a(this).attr("name");b=b.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),a(this).attr("name",b).attr("id",b)}),c.find("label").each(function(){var b=a(this).attr("for");b=b.replace(/\[(\d+)\]/,"["+parseInt(d)+"]"),a(this).attr("for",b)}),c.insertAfter(b),!1}),a(document.body).on("click","#edd_tax_rates .edd_remove_tax_rate",function(){if(confirm(edd_vars.delete_tax_rate)){var b=a("#edd_tax_rates tr:visible"),c=b.length;2===c?(a("#edd_tax_rates select").val(""),a('#edd_tax_rates input[type="text"]').val(""),a('#edd_tax_rates input[type="number"]').val(""),a('#edd_tax_rates input[type="checkbox"]').attr("checked",!1)):a(this).closest("tr").remove(),a("#edd_tax_rates tr").each(function(b){a(this).children().find("input, select").each(function(){var c=a(this).attr("name");c=c.replace(/\[(\d+)\]/,"["+(b-1)+"]"),a(this).attr("name",c).attr("id",c)})})}return!1})},emails:function(){var b=a("#email-preview-wrap");if(b.length){var c=a("#email-preview");b.colorbox({inline:!0,href:c,width:"80%",height:"auto"})}},misc:function(){var b=a('select[name="edd_settings[download_method]"]'),c=b.parent().parent().next();"direct"==b.val()&&(c.hide(),c.find("input").prop("checked",!1)),b.on("change",function(){"direct"==a(this).val()?(c.hide(),c.find("input").prop("checked",!1)):c.show()})}};h.init(),a(".download_page_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return confirm(edd_vars.delete_payment)?!0:!1}),a("#the-list").on("click",".editinline",function(){var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#post-"+b),d=c.find(".column-price .downloadprice-"+b).val();d!=a("#post-"+b+".column-price .downloadprice-"+b).val()?a(".regprice","#edd-download-data").val(d).attr("disabled",!1):a(".regprice","#edd-download-data").val(edd_vars.quick_edit_warning).attr("disabled","disabled")}),a(document.body).on("click","#bulk_edit",function(){var b=a("#bulk-edit"),c=new Array;b.find("#bulk-titles").children().each(function(){c.push(a(this).attr("id").replace(/^(ttle)/i,""))});var d=a('#edd-download-data input[name="_edd_regprice"]').val(),e={action:"edd_save_bulk_edit",edd_bulk_nonce:c,post_ids:c,price:d};a.post(ajaxurl,e)}),a(".edd-select-chosen").chosen({inherit_select_classes:!0,placeholder_text_single:edd_vars.one_option,placeholder_text_multiple:edd_vars.one_or_more_option}),a(".edd-select-chosen .chosen-search input").attr("placeholder",edd_vars.search_placeholder),a(".chosen-choices").on("click",function(){a(this).children("li").children("input").attr("placeholder",edd_vars.type_to_search)});var i,j=342;a(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(b){var c=a(this).val(),d=a(this).closest(".edd-select-chosen"),e=d.attr("id").replace("_chosen",""),f=d.hasClass("no-bundles"),g=b.which,h="edd_download_search";d.prev().data("search-type")&&(h="edd_"+d.prev().data("search-type")+"_search"),c.length<=3&&"edd_download_search"==h||16==g||13==g||91==g||17==g||37==g||38==g||39==g||40==g||(clearTimeout(i),i=setTimeout(function(){a.ajax({type:"GET",url:ajaxurl,data:{action:h,s:c,no_bundles:f},dataType:"json",beforeSend:function(){a("ul.chosen-results").empty()},success:function(b){a("#"+e+" option:not(:selected)").remove(),a.each(b,function(b,c){a("#"+e+' option[value="'+c.id+'"]').length||a("#"+e).prepend('<option value="'+c.id+'">'+c.name+"</option>")}),a(".edd-select-chosen").trigger("chosen:updated"),a("#"+e).next().find("input").val(c)}}).fail(function(a){window.console&&window.console.log&&console.log(a)}).done(function(a){})},j))}),a("#post").on("click",".edd-thickbox",function(){a(".edd-select-chosen","#choose-download").css("width","100%")});var k={init:function(){this.revoke_api_key(),this.regenerate_api_key(),this.create_api_key(),this.recount_stats()},revoke_api_key:function(){a(document.body).on("click",".edd-revoke-api-key",function(a){return confirm(edd_vars.revoke_api_key)})},regenerate_api_key:function(){a(document.body).on("click",".edd-regenerate-api-key",function(a){return confirm(edd_vars.regenerate_api_key)})},create_api_key:function(){a(document.body).on("submit","#api-key-generate-form",function(b){var c=a('input[type="text"][name="user_id"]');c.css("border-color","#ddd");var d=c.val();return d.length<1||0==d?(c.css("border-color","#ff0000"),!1):void 0})},recount_stats:function(){a("body").on("change","#recount-stats-type",function(){var b=a("#edd-tools-recount-form"),c=a("option:selected",this).data("type"),d=a("#recount-stats-submit"),e=a("#tools-product-dropdown");if(b.find(".notice-wrap").remove(),d.removeClass("button-disabled").attr("disabled",!1),e.hide(),a(".edd-recount-stats-descriptions span").hide(),"recount-download"===c)e.show(),e.find(".edd-select-chosen").css("width","auto");else if("reset-stats"===c){b.append('<div class="notice-wrap"></div>');var f=b.find(".notice-wrap");f.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>"),a("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}else e.hide(),e.val(0);a("#"+c).show()}),a("body").on("change","#confirm-reset",function(){var b=a(this).is(":checked");b?a("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):a("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),a("#edd-tools-recount-form").submit(function(b){var c=a("#recount-stats-type").val(),d=a(this),e=a("option:selected",this).data("type");if("reset-stats"===e){var f=a("#confirm-reset").is(":checked");if(f)return!0;h=!0}d.find(".notice-wrap").remove(),d.append('<div class="notice-wrap"></div>');var g=d.find(".notice-wrap"),h=!1;if((null===c||0===c)&&(g.html('<div class="updated error"><p>'+edd_vars.batch_export_no_class+"</p></div>"),h=!0),"recount-download"===e){var i=a('select[name="download_id"]').val();0==i&&(g.html('<div class="updated error"><p>'+edd_vars.batch_export_no_reqs+"</p></div>"),h=!0)}return h?(d.find(".button-disabled").removeClass("button-disabled"),!1):void 0})}};k.init();var l={init:function(){this.submit(),this.dismiss_message()},submit:function(){var b=this;a(document.body).on("submit",".edd-export-form",function(c){c.preventDefault();var d=a(this).find('input[type="submit"]');if(!d.hasClass("button-disabled")){var e=a(this).serialize();d.addClass("button-disabled"),a(this).find(".notice-wrap").remove(),a(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),b.process_step(1,e,b)}})},process_step:function(b,c,d){a.ajax({type:"POST",url:ajaxurl,data:{form:c,action:"edd_do_ajax_export",step:b},dataType:"json",success:function(b){if("done"==b.step||b.error||b.success){var e=a(".edd-export-form").find(".edd-progress").parent().parent(),f=e.find(".notice-wrap");if(e.find(".button-disabled").removeClass("button-disabled"),b.error){var g=b.message;f.html('<div class="updated error"><p>'+g+"</p></div>")}else if(b.success){var h=b.message;f.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+h+'<span class="notice-dismiss"></span></p></div>')}else f.remove(),window.location=b.url}else a(".edd-progress div").animate({width:b.percentage+"%"},50,function(){}),d.process_step(parseInt(b.step),c,d)}}).fail(function(a){window.console&&window.console.log&&console.log(a)})},dismiss_message:function(){a("body").on("click","#edd-batch-success .notice-dismiss",function(){a("#edd-batch-success").parent().slideUp("fast")})}};l.init();var m={init:function(){this.submit()},submit:function(){var b=this;a(".edd-import-form").ajaxForm({beforeSubmit:b.before_submit,success:b.success,complete:b.complete,dataType:"json",error:b.error})},before_submit:function(b,c,d){if(c.find(".notice-wrap").remove(),c.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 e=a(".edd-import-form").find(".edd-progress").parent().parent(),f=e.find(".notice-wrap");return e.find(".button-disabled").removeClass("button-disabled"),f.html('<div class="update error"><p>'+edd_vars.unsupported_browser+"</p></div>"),!1}},success:function(a,b,c,d){},complete:function(b){var c=jQuery.parseJSON(b.responseText);if(c.success){var d=a(".edd-import-form .notice-wrap").parent();d.find(".edd-import-file-wrap,.notice-wrap").remove(),d.find(".edd-import-options").slideDown();var e=d.find("select.edd-import-csv-column"),g=(e.parent().parent(),"");a.each(c.data.columns,function(a,b){g+='<option value="'+b+'">'+b+"</option>"}),e.append(g),e.on("change",function(){var b=a(this).val();b&&0!=c.data.first_row[b]?a(this).parent().next().html(c.data.first_row[b]):a(this).parent().next().html("")}),a("body").on("click",".edd-import-proceed",function(a){a.preventDefault(),d.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),c.data.mapping=d.serialize(),m.process_step(1,c.data,self)})}else m.error(b)},error:function(b){var c=jQuery.parseJSON(b.responseText),d=a(".edd-import-form").find(".edd-progress").parent().parent(),e=d.find(".notice-wrap");d.find(".button-disabled").removeClass("button-disabled"),c.data.error?e.html('<div class="update error"><p>'+c.data.error+"</p></div>"):e.remove()},process_step:function(b,c,d){a.ajax({type:"POST",url:ajaxurl,data:{form:c.form,nonce:c.nonce,"class":c["class"],upload:c.upload,mapping:c.mapping,action:"edd_do_ajax_import",step:b},dataType:"json",success:function(b){if("done"==b.data.step||b.data.error){var e=a(".edd-import-form").find(".edd-progress").parent().parent(),f=e.find(".notice-wrap");e.find(".button-disabled").removeClass("button-disabled"),b.data.error?f.html('<div class="update error"><p>'+b.data.error+"</p></div>"):(e.find(".edd-import-options").hide(),a("html, body").animate({scrollTop:e.parent().offset().top},500),f.html('<div class="updated"><p>'+b.data.message+"</p></div>"))}else a(".edd-progress div").animate({width:b.data.percentage+"%"},50,function(){}),m.process_step(parseInt(b.data.step),c,d)}}).fail(function(a){window.console&&window.console.log&&console.log(a)})}};m.init();var n={vars:{customer_card_wrap_editable:a(".edd-customer-card-wrapper .editable"),customer_card_wrap_edit_item:a(".edd-customer-card-wrapper .edit-item"),user_id:a('input[name="customerinfo[user_id]"]'),state_input:a(':input[name="customerinfo[state]"]'),note:a("#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(){a(document.body).on("click","#edit-customer",function(a){a.preventDefault(),n.vars.customer_card_wrap_editable.hide(),n.vars.customer_card_wrap_edit_item.fadeIn().css("display","block")})},add_email:function(){a(document.body).on("click","#add-customer-email",function(b){b.preventDefault();var c=a(this),d=c.parent();d.parent().find(".notice-wrap").remove(),d.find(".spinner").css("visibility","visible"),c.attr("disabled",!0);var e=d.find('input[name="customer-id"]').val(),f=d.find('input[name="additional-email"]').val(),g=d.find('input[name="make-additional-primary"]').is(":checked"),h=d.find('input[name="add_email_nonce"]').val(),i={edd_action:"customer-add-email",customer_id:e,email:f,primary:g,_wpnonce:h};a.post(ajaxurl,i,function(a){!0===a.success?window.location.href=a.redirect:(c.attr("disabled",!1),d.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+a.message+"</p></div></div>"),d.find(".spinner").css("visibility","hidden"))},"json")})},user_search:function(){a(document.body).on("click.eddSelectUser",".edd_user_search_results a",function(b){b.preventDefault();var c=a(this).data("userid");n.vars.user_id.val(c)})},remove_user:function(){a(document.body).on("click","#disconnect-customer",function(b){b.preventDefault();var c=a('input[name="customerinfo[id]"]').val(),d={edd_action:"disconnect-userid",customer_id:c,_wpnonce:a("#edit-customer-info #_wpnonce").val()};a.post(ajaxurl,d,function(a){window.location.href=window.location.href},"json")})},cancel_edit:function(){a(document.body).on("click","#edd-edit-customer-cancel",function(b){b.preventDefault(),n.vars.customer_card_wrap_edit_item.hide(),n.vars.customer_card_wrap_editable.show(),a(".edd_user_search_results").html("")})},change_country:function(){a('select[name="customerinfo[country]"]').change(function(){var b=a(this);return data={action:"edd_get_shop_states",country:b.val(),field_name:"customerinfo[state]"},a.post(ajaxurl,data,function(a){"nostates"==a?n.vars.state_input.replaceWith('<input type="text" name="'+data.field_name+'" value="" class="edd-edit-toggles medium-text"/>'):n.vars.state_input.replaceWith(a)}),!1})},add_note:function(){a(document.body).on("click","#add-customer-note",function(b){b.preventDefault();var c={edd_action:"add-customer-note",customer_id:a("#customer-id").val(),customer_note:n.vars.note.val(),add_customer_note_nonce:a("#add_customer_note_nonce").val()};if(c.customer_note)a.ajax({type:"POST",data:c,url:ajaxurl,success:function(b){a("#edd-customer-notes").prepend(b),a(".edd-no-customer-notes").hide(),n.vars.note.val("")}}).fail(function(a){window.console&&window.console.log&&console.log(a)});else{var d=n.vars.note.css("border-color");n.vars.note.css("border-color","red"),setTimeout(function(){n.vars.note.css("border-color",d)},500)}})},delete_checked:function(){a("#edd-customer-delete-confirm").change(function(){var b=a("#edd-customer-delete-records"),c=a("#edd-delete-customer");a(this).prop("checked")?(b.attr("disabled",!1),c.attr("disabled",!1)):(b.attr("disabled",!0),b.prop("checked",!1),c.attr("disabled",!0))})}};n.init(),a(".edd-ajax-user-search").keyup(function(){var b=a(this).val(),c="";a(this).data("exclude")&&(c=a(this).data("exclude")),a(".edd-ajax").show(),data={action:"edd_search_users",user_name:b,exclude:c},document.body.style.cursor="wait",a.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(b){a(".edd-ajax").hide(),a(".edd_user_search_results").removeClass("hidden"),a(".edd_user_search_results span").html(""),a(b.results).appendTo(".edd_user_search_results span"),document.body.style.cursor="default"}})}),a(document.body).on("click.eddSelectUser",".edd_user_search_results span a",function(b){b.preventDefault();var c=a(this).data("login");a(".edd-ajax-user-search").val(c),a(".edd_user_search_results").addClass("hidden"),a(".edd_user_search_results span").html("")}),a(document.body).on("click.eddCancelUserSearch",".edd_user_search_results a.edd-ajax-user-cancel",function(b){b.preventDefault(),a(".edd-ajax-user-search").val(""),a(".edd_user_search_results").addClass("hidden"),a(".edd_user_search_results span").html("")}),a("#edd_dashboard_sales").length&&a.ajax({type:"GET",data:{action:"edd_load_dashboard_widget"},url:ajaxurl,success:function(b){a("#edd_dashboard_sales .inside").html(b)}}),a(document).on("keydown",".customer-note-input",function(b){13==b.keyCode&&(b.metaKey||b.ctrlKey)&&a("#add-customer-note").click()})});var eddFormatCurrency=function(a){var b=parseFloat(a),c=edd_vars.currency,d=edd_vars.currency_decimals;return b.toLocaleString(c,{style:"currency",
|
2 |
-
currency:
|
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};
|
assets/js/edd-ajax.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function edd_load_gateway(
|
1 |
+
function edd_load_gateway(e){jQuery(".edd-cart-ajax").show(),jQuery("#edd_purchase_form_wrap").html('<img src="'+edd_scripts.ajax_loader+'"/>');var d=edd_scripts.ajaxurl;d+=d.indexOf("?")>0?"&":"?",d=d+"payment-mode="+e,jQuery.post(d,{action:"edd_load_gateway",edd_payment_mode:e},function(d){jQuery("#edd_purchase_form_wrap").html(d),jQuery(".edd-no-js").hide(),jQuery("body").trigger("edd_gateway_loaded",[e])})}var edd_scripts;jQuery(document).ready(function(e){function d(){var d,t=e(this),a="undefined"!=typeof edd_global_vars;if("card_state"!=t.attr("id")){var i={action:"edd_get_shop_states",country:t.val(),field_name:"card_state"};e.ajax({type:"POST",data:i,url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(i){console.log(i),console.log(a),d=a?e("#edd_purchase_form"):t.closest("form");var r='input[name="card_state"], select[name="card_state"], input[name="edd_address_state"], select[name="edd_address_state"]';if("nostates"==e.trim(i)){var o='<input type="text" name="card_state" class="cart-state edd-input required" value=""/>';d.find(r).replaceWith(o)}else d.find(r).replaceWith(i);a&&e("body").trigger("edd_cart_billing_address_updated",[i])}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){a&&recalculate_taxes()})}else a&&recalculate_taxes();return!1}e(".edd-no-js").hide(),e("a.edd-add-to-cart").addClass("edd-has-js"),e("body").on("click.eddRemoveFromCart",".edd-remove-from-cart",function(d){var t=e(this),a=t.data("cart-item"),i=t.data("action"),r=t.data("download-id"),o={action:i,cart_item:a};return e.ajax({type:"POST",data:o,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(d){if(d.removed){if(parseInt(edd_scripts.position_in_cart,10)===parseInt(a,10))return window.location=window.location,!1;e(".edd-cart").find("[data-cart-item='"+a+"']").parent().remove();var t=0;e(".edd-cart").find("[data-cart-item]").each(function(){e(this).attr("data-cart-item",t),t+=1}),e("[id^=edd_purchase_"+r+"]").length&&(e("[id^=edd_purchase_"+r+"] .edd_go_to_checkout").hide(),e("[id^=edd_purchase_"+r+"] a.edd-add-to-cart").show().removeAttr("data-edd-loading"),"1"==edd_scripts.quantities_enabled&&e("[id^=edd_purchase_"+r+"] .edd_download_quantity_wrapper").show()),e("span.edd-cart-quantity").text(d.cart_quantity),e("body").trigger("edd_quantity_updated",[d.cart_quantity]),edd_scripts.taxes_enabled&&(e(".cart_item.edd_subtotal span").html(d.subtotal),e(".cart_item.edd_cart_tax span").html(d.tax)),e(".cart_item.edd_total span").html(d.total),0==d.cart_quantity&&(e(".cart_item.edd_subtotal,.edd-cart-number-of-items,.cart_item.edd_checkout,.cart_item.edd_cart_tax,.cart_item.edd_total").hide(),e(".edd-cart").append('<li class="cart_item empty">'+edd_scripts.empty_cart_message+"</li>")),e("body").trigger("edd_cart_item_removed",[d])}}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){}),!1}),e("body").on("click.eddAddToCart",".edd-add-to-cart",function(d){d.preventDefault();var t=e(this),a=t.closest("form");t.prop("disabled",!0);var i=t.find(".edd-loading"),r=t.closest("div"),o=i.width(),c=i.height();t.attr("data-edd-loading",""),i.css({"margin-left":o/-2,"margin-top":c/-2});var a=t.parents("form").last(),s=t.data("download-id"),n=t.data("variable-price"),_=t.data("price-mode"),l=[],u=!0;if("yes"==n)if(a.find(".edd_price_option_"+s).is("input:hidden"))l[0]=e(".edd_price_option_"+s,a).val(),a.find(".edd-submit").data("price")&&a.find(".edd-submit").data("price")>0&&(u=!1);else{if(!a.find(".edd_price_option_"+s+":checked",a).length)return t.removeAttr("data-edd-loading"),void alert(edd_scripts.select_option);a.find(".edd_price_option_"+s+":checked",a).each(function(d){if(l[d]=e(this).val(),!0===u){var t=e(this).data("price");t&&t>0&&(u=!1)}})}else l[0]=s,t.data("price")&&t.data("price")>0&&(u=!1);if(u&&a.find(".edd_action_input").val("add_to_cart"),"straight_to_gateway"==a.find(".edd_action_input").val())return a.submit(),!0;var p=t.data("action"),m={action:p,download_id:s,price_ids:l,post_data:e(a).serialize()};return e.ajax({type:"POST",data:m,dataType:"json",url:edd_scripts.ajaxurl,xhrFields:{withCredentials:!0},success:function(d){if("1"==edd_scripts.redirect_to_checkout&&"1"==a.find("#edd_redirect_to_checkout").val())window.location=edd_scripts.checkout_page;else{"1"===edd_scripts.taxes_enabled&&(e(".cart_item.edd_subtotal").show(),e(".cart_item.edd_cart_tax").show()),e(".cart_item.edd_total").show(),e(".cart_item.edd_checkout").show(),e(".cart_item.empty").length?(e(d.cart_item).insertBefore(".edd-cart-meta:first"),e(".cart_item.empty").hide()):e(d.cart_item).insertBefore(".edd-cart-meta:first"),"1"===edd_scripts.taxes_enabled&&(e(".edd-cart-meta.edd_subtotal span").html(d.subtotal),e(".edd-cart-meta.edd_cart_tax span").html(d.tax)),e(".edd-cart-meta.edd_total span").html(d.total);e(".edd-cart-item-title",d.cart_item).length;if(e("span.edd-cart-quantity").each(function(){e(this).text(d.cart_quantity),e("body").trigger("edd_quantity_updated",[d.cart_quantity])}),"none"==e(".edd-cart-number-of-items").css("display")&&e(".edd-cart-number-of-items").show("slow"),("no"==n||"multi"!=_)&&(e("a.edd-add-to-cart",r).toggle(),e(".edd_go_to_checkout",r).css("display","inline-block")),"multi"==_&&t.removeAttr("data-edd-loading"),e(".edd_download_purchase_form").length&&("no"==n||!a.find(".edd_price_option_"+s).is("input:hidden"))){var i=e('.edd_download_purchase_form *[data-download-id="'+s+'"]').parents("form");e("a.edd-add-to-cart",i).hide(),"multi"!=_&&i.find(".edd_download_quantity_wrapper").slideUp(),e(".edd_go_to_checkout",i).show().removeAttr("data-edd-loading")}"incart"!=d&&(e(".edd-cart-added-alert",r).fadeIn(),setTimeout(function(){e(".edd-cart-added-alert",r).fadeOut()},3e3)),t.prop("disabled",!1),e("body").trigger("edd_cart_item_added",[d])}}}).fail(function(e){window.console&&window.console.log&&console.log(e)}).done(function(e){}),!1}),e("#edd_checkout_form_wrap").on("click",".edd_checkout_register_login",function(){var d=e(this),t={action:d.data("action")};return e(".edd-cart-ajax").show(),e.post(edd_scripts.ajaxurl,t,function(d){e("#edd_checkout_login_register").html(edd_scripts.loading),e("#edd_checkout_login_register").html(d),e(".edd-cart-ajax").hide()}),!1}),e(document).on("click","#edd_purchase_form #edd_login_fields input[type=submit]",function(d){d.preventDefault();var t=e(this).val();e(this).val(edd_global_vars.purchase_loading),e(this).after('<span class="edd-cart-ajax"><i class="edd-icon-spinner edd-icon-spin"></i></span>');var a={action:"edd_process_checkout_login",edd_ajax:1,edd_user_login:e("#edd_login_fields #edd_user_login").val(),edd_user_pass:e("#edd_login_fields #edd_user_pass").val()};e.post(edd_global_vars.ajaxurl,a,function(d){"success"==e.trim(d)?(e(".edd_errors").remove(),window.location=edd_scripts.checkout_page):(e("#edd_login_fields input[type=submit]").val(t),e(".edd-cart-ajax").remove(),e(".edd_errors").remove(),e("#edd-user-login-submit").before(d))})}),e("select#edd-gateway, input.edd-gateway").change(function(d){var t=e("#edd-gateway option:selected, input.edd-gateway:checked").val();return"0"==t?!1:(edd_load_gateway(t),!1)}),"1"==edd_scripts.is_checkout&&e("select#edd-gateway, input.edd-gateway").length&&setTimeout(function(){edd_load_gateway(edd_scripts.default_gateway)},200),e(document).on("click","#edd_purchase_form #edd_purchase_submit input[type=submit]",function(d){var t=document.getElementById("edd_purchase_form");if("function"!=typeof t.checkValidity||!1!==t.checkValidity()){d.preventDefault();var a=e(this).val();e(this).val(edd_global_vars.purchase_loading),e(this).prop("disabled",!0),e(this).after('<span class="edd-cart-ajax"><i class="edd-icon-spinner edd-icon-spin"></i></span>'),e.post(edd_global_vars.ajaxurl,e("#edd_purchase_form").serialize()+"&action=edd_process_checkout&edd_ajax=true",function(d){"success"==e.trim(d)?(e(".edd_errors").remove(),e(".edd-error").hide(),e(t).submit()):(e("#edd-purchase-button").val(a),e(".edd-cart-ajax").remove(),e(".edd_errors").remove(),e(".edd-error").hide(),e("#edd_purchase_submit").before(d),e("#edd-purchase-button").prop("disabled",!1))})}}),e("body").on("change","#edd_cc_address input.card_state, #edd_cc_address select, #edd_address_country",d)});
|
assets/js/edd-checkout-global.js
CHANGED
@@ -149,7 +149,9 @@ window.EDD_Checkout = (function($) {
|
|
149 |
|
150 |
} else {
|
151 |
|
152 |
-
inputs.
|
|
|
|
|
153 |
$('#edd_cc_fields,#edd_cc_address').slideDown();
|
154 |
|
155 |
}
|
149 |
|
150 |
} else {
|
151 |
|
152 |
+
if (!inputs.is('.card-address-2')) {
|
153 |
+
inputs.attr('required','required');
|
154 |
+
}
|
155 |
$('#edd_cc_fields,#edd_cc_address').slideDown();
|
156 |
|
157 |
}
|
assets/js/edd-checkout-global.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function recalculate_taxes(
|
1 |
+
function recalculate_taxes(e){if("1"==edd_global_vars.taxes_enabled){var d=jQuery("#edd_cc_address");e||(e=d.find("#card_state").val());var t={action:"edd_recalculate_taxes",billing_country:d.find("#billing_country").val(),state:e};jQuery.ajax({type:"POST",data:t,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(e){jQuery("#edd_checkout_cart_form").replaceWith(e.html),jQuery(".edd_cart_amount").html(e.total);var d=new Object;d.postdata=t,d.response=e,jQuery("body").trigger("edd_taxes_recalculated",[d])}}).fail(function(e){window.console&&window.console.log&&(console.log(e),jQuery("body").trigger("edd_taxes_recalculated",[tax_data]))})}}window.EDD_Checkout=function(e){"use strict";function d(){c=e(document.body),i=e("#edd_purchase_form"),s=e(".edd_cart_amount"),r=s.text(),l=e("#edd_checkout_form_wrap"),c.on("keyup change",".edd-do-validate .card-number",function(){t(e(this))}),c.on("submit","#edd_payment_mode",function(){var d=e("#edd-gateway option:selected").val();return 0==d?(alert(edd_global_vars.no_gateway),!1):void 0}),c.on("click","#edd_payment_mode_select input",function(){e("#edd_payment_mode_select label.edd-gateway-option-selected").removeClass("edd-gateway-option-selected"),e("#edd_payment_mode_select input:checked").parent().addClass("edd-gateway-option-selected")}),l.on("click",".edd-apply-discount",a),l.on("keypress","#edd-discount",function(e){return"13"==e.keyCode?!1:void 0}),l.on("keyup","#edd-discount",function(e){"13"==e.keyCode&&l.find(".edd-apply-discount").trigger("click")}),c.on("click",".edd_discount_remove",o),c.on("click",".edd_discount_link",function(d){d.preventDefault(),e(".edd_discount_link").parent().hide(),e("#edd-discount-code-wrap").show().find("#edd-discount").focus()}),c.find("#edd-discount-code-wrap").hide(),c.find("#edd_show_discount").show(),c.on("change",".edd-item-quantity",n),c.on("click",".edd-amazon-logout #Logout",function(e){e.preventDefault(),amazon.Login.logout(),window.location=edd_amazon.checkoutUri})}function t(d){var t=d;t.validateCreditCard(function(d){var a=e(".card-type");null==d.card_type?(a.removeClass().addClass("off card-type"),t.removeClass("valid"),t.addClass("error")):(a.removeClass("off"),a.addClass(d.card_type.name),d.length_valid&&d.luhn_valid?(t.addClass("valid"),t.removeClass("error")):(t.removeClass("valid"),t.addClass("error")))})}function a(d){d.preventDefault();var t=(e(this),e("#edd-discount").val()),a=e("#edd-discount-loader");if(""==t||t==edd_global_vars.enter_discount)return!1;var o={action:"edd_apply_discount",code:t,form:e("#edd_purchase_form").serialize()};return e("#edd-discount-error-wrap").html("").hide(),a.show(),e.ajax({type:"POST",data:o,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(d){if(d)if("valid"==d.msg){e(".edd_cart_discount").html(d.html),e(".edd_cart_discount_row").show(),e(".edd_cart_amount").each(function(){e(this).text(d.total)}),e("#edd-discount",l).val(""),recalculate_taxes();var t=e("#edd_cc_fields .edd-input, #edd_cc_fields .edd-select,#edd_cc_address .edd-input, #edd_cc_address .edd-select,#edd_payment_mode_select .edd-input, #edd_payment_mode_select .edd-select");"0.00"==d.total_plain?(e("#edd_cc_fields,#edd_cc_address,#edd_payment_mode_select").slideUp(),t.removeAttr("required"),e('input[name="edd-gateway"]').val("manual")):(t.is(".card-address-2")||t.attr("required","required"),e("#edd_cc_fields,#edd_cc_address").slideDown()),c.trigger("edd_discount_applied",[d])}else e("#edd-discount-error-wrap").html('<span class="edd_error">'+d.msg+"</span>"),e("#edd-discount-error-wrap").show(),c.trigger("edd_discount_invalid",[d]);else window.console&&window.console.log&&console.log(d),c.trigger("edd_discount_failed",[d]);a.hide()}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!1}function o(d){var t=e(this),a={action:"edd_remove_discount",code:t.data("code")};return e.ajax({type:"POST",data:a,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(d){var t="0"+edd_global_vars.decimal_separator+"00";e(".edd_cart_amount").each(function(){(edd_global_vars.currency_sign+t==e(this).text()||t+edd_global_vars.currency_sign==e(this).text())&&window.location.reload(),e(this).text(d.total)}),e(".edd_cart_discount").html(d.html),d.discounts||e(".edd_cart_discount_row").hide(),recalculate_taxes(),e("#edd_cc_fields,#edd_cc_address").slideDown(),c.trigger("edd_discount_removed",[d])}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!1}function n(d){var t=e(this),a=t.val(),o=t.data("key"),n=t.closest(".edd_cart_item").data("download-id"),i=t.parent().find('input[name="edd-cart-download-'+o+'-options"]').val(),s={action:"edd_update_quantity",quantity:a,download_id:n,options:i};return e.ajax({type:"POST",data:s,dataType:"json",url:edd_global_vars.ajaxurl,xhrFields:{withCredentials:!0},success:function(d){e(".edd_cart_subtotal_amount").each(function(){e(this).text(d.subtotal)}),e(".edd_cart_tax_amount").each(function(){e(this).text(d.taxes)}),e(".edd_cart_amount").each(function(){e(this).text(d.total),c.trigger("edd_quantity_updated",[d])})}}).fail(function(e){window.console&&window.console.log&&console.log(e)}),!1}var c,i,s,r,l;return{init:d,recalculate_taxes:recalculate_taxes}}(window.jQuery),window.jQuery(document).ready(EDD_Checkout.init);
|
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.3
|
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.3
|
29 |
*/
|
30 |
|
31 |
// Exit if accessed directly.
|
195 |
|
196 |
// Plugin version.
|
197 |
if ( ! defined( 'EDD_VERSION' ) ) {
|
198 |
+
define( 'EDD_VERSION', '2.6.3' );
|
199 |
}
|
200 |
|
201 |
// Plugin Folder Path.
|
includes/EDD_SL_Plugin_Updater.php
CHANGED
@@ -10,14 +10,16 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
10 |
* Allows plugins to use their own update API.
|
11 |
*
|
12 |
* @author Pippin Williamson
|
13 |
-
* @version 1.6.
|
14 |
*/
|
15 |
class EDD_SL_Plugin_Updater {
|
16 |
-
|
17 |
-
private $
|
18 |
-
private $
|
19 |
-
private $
|
20 |
-
private $
|
|
|
|
|
21 |
|
22 |
/**
|
23 |
* Class constructor.
|
@@ -33,11 +35,12 @@ class EDD_SL_Plugin_Updater {
|
|
33 |
|
34 |
global $edd_plugin_data;
|
35 |
|
36 |
-
$this->api_url
|
37 |
-
$this->api_data
|
38 |
-
$this->name
|
39 |
-
$this->slug
|
40 |
-
$this->version
|
|
|
41 |
|
42 |
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
43 |
|
@@ -80,35 +83,34 @@ class EDD_SL_Plugin_Updater {
|
|
80 |
|
81 |
global $pagenow;
|
82 |
|
83 |
-
if( ! is_object( $_transient_data ) ) {
|
84 |
$_transient_data = new stdClass;
|
85 |
}
|
86 |
|
87 |
-
if( 'plugins.php' == $pagenow && is_multisite() ) {
|
88 |
return $_transient_data;
|
89 |
}
|
90 |
|
91 |
-
if ( empty( $_transient_data->response )
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
|
96 |
|
97 |
-
|
98 |
|
99 |
-
|
100 |
|
101 |
-
|
102 |
|
103 |
-
$_transient_data->
|
104 |
-
$_transient_data->checked[ $this->name ] = $this->version;
|
105 |
|
106 |
}
|
107 |
|
|
|
|
|
|
|
108 |
}
|
109 |
|
110 |
return $_transient_data;
|
111 |
-
|
112 |
}
|
113 |
|
114 |
/**
|
@@ -208,7 +210,6 @@ class EDD_SL_Plugin_Updater {
|
|
208 |
}
|
209 |
}
|
210 |
|
211 |
-
|
212 |
/**
|
213 |
* Updates information on the "View version x.x details" page with custom data.
|
214 |
*
|
@@ -265,7 +266,6 @@ class EDD_SL_Plugin_Updater {
|
|
265 |
return $_data;
|
266 |
}
|
267 |
|
268 |
-
|
269 |
/**
|
270 |
* Disable SSL verification in order to prevent download update failures
|
271 |
*
|
@@ -294,13 +294,15 @@ class EDD_SL_Plugin_Updater {
|
|
294 |
*/
|
295 |
private function api_request( $_action, $_data ) {
|
296 |
|
|
|
|
|
297 |
$data = array_merge( $this->api_data, $_data );
|
298 |
|
299 |
if ( $data['slug'] != $this->slug ) {
|
300 |
return;
|
301 |
}
|
302 |
|
303 |
-
if( $this->api_url == home_url() ) {
|
304 |
return false; // Don't allow a plugin to ping itself
|
305 |
}
|
306 |
|
10 |
* Allows plugins to use their own update API.
|
11 |
*
|
12 |
* @author Pippin Williamson
|
13 |
+
* @version 1.6.4
|
14 |
*/
|
15 |
class EDD_SL_Plugin_Updater {
|
16 |
+
|
17 |
+
private $api_url = '';
|
18 |
+
private $api_data = array();
|
19 |
+
private $name = '';
|
20 |
+
private $slug = '';
|
21 |
+
private $version = '';
|
22 |
+
private $wp_override = false;
|
23 |
|
24 |
/**
|
25 |
* Class constructor.
|
35 |
|
36 |
global $edd_plugin_data;
|
37 |
|
38 |
+
$this->api_url = trailingslashit( $_api_url );
|
39 |
+
$this->api_data = $_api_data;
|
40 |
+
$this->name = plugin_basename( $_plugin_file );
|
41 |
+
$this->slug = basename( $_plugin_file, '.php' );
|
42 |
+
$this->version = $_api_data['version'];
|
43 |
+
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
44 |
|
45 |
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
46 |
|
83 |
|
84 |
global $pagenow;
|
85 |
|
86 |
+
if ( ! is_object( $_transient_data ) ) {
|
87 |
$_transient_data = new stdClass;
|
88 |
}
|
89 |
|
90 |
+
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
91 |
return $_transient_data;
|
92 |
}
|
93 |
|
94 |
+
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
95 |
+
return $_transient_data;
|
96 |
+
}
|
|
|
|
|
97 |
|
98 |
+
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
|
99 |
|
100 |
+
if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
|
101 |
|
102 |
+
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
103 |
|
104 |
+
$_transient_data->response[ $this->name ] = $version_info;
|
|
|
105 |
|
106 |
}
|
107 |
|
108 |
+
$_transient_data->last_checked = time();
|
109 |
+
$_transient_data->checked[ $this->name ] = $this->version;
|
110 |
+
|
111 |
}
|
112 |
|
113 |
return $_transient_data;
|
|
|
114 |
}
|
115 |
|
116 |
/**
|
210 |
}
|
211 |
}
|
212 |
|
|
|
213 |
/**
|
214 |
* Updates information on the "View version x.x details" page with custom data.
|
215 |
*
|
266 |
return $_data;
|
267 |
}
|
268 |
|
|
|
269 |
/**
|
270 |
* Disable SSL verification in order to prevent download update failures
|
271 |
*
|
294 |
*/
|
295 |
private function api_request( $_action, $_data ) {
|
296 |
|
297 |
+
global $wp_version;
|
298 |
+
|
299 |
$data = array_merge( $this->api_data, $_data );
|
300 |
|
301 |
if ( $data['slug'] != $this->slug ) {
|
302 |
return;
|
303 |
}
|
304 |
|
305 |
+
if( $this->api_url == trailingslashit (home_url() ) ) {
|
306 |
return false; // Don't allow a plugin to ping itself
|
307 |
}
|
308 |
|
includes/admin/import/class-batch-import-payments.php
CHANGED
@@ -522,11 +522,11 @@ class EDD_Batch_Payments_Import extends EDD_Batch_Import {
|
|
522 |
|
523 |
$d = (array) explode( '|', $download );
|
524 |
preg_match( '/\{(\d+(\.\d+|\d+))\}/', $d[1], $matches );
|
525 |
-
$price = substr( $d[1], 0, strpos( $d[1], '{' ) );
|
526 |
-
$tax = isset( $matches[1] ) ? $matches[1] : 0;
|
527 |
|
528 |
$d_array[] = array(
|
529 |
-
'download' => $d[0],
|
530 |
'price' => $price - $tax,
|
531 |
'tax' => $tax
|
532 |
);
|
@@ -579,4 +579,4 @@ class EDD_Batch_Payments_Import extends EDD_Batch_Import {
|
|
579 |
public function get_import_type_label() {
|
580 |
return __( 'payments', 'easy-digital-downloads' );
|
581 |
}
|
582 |
-
}
|
522 |
|
523 |
$d = (array) explode( '|', $download );
|
524 |
preg_match( '/\{(\d+(\.\d+|\d+))\}/', $d[1], $matches );
|
525 |
+
$price = trim( substr( $d[1], 0, strpos( $d[1], '{' ) ) );
|
526 |
+
$tax = isset( $matches[1] ) ? trim( $matches[1] ) : 0;
|
527 |
|
528 |
$d_array[] = array(
|
529 |
+
'download' => trim( $d[0] ),
|
530 |
'price' => $price - $tax,
|
531 |
'tax' => $tax
|
532 |
);
|
579 |
public function get_import_type_label() {
|
580 |
return __( 'payments', 'easy-digital-downloads' );
|
581 |
}
|
582 |
+
}
|
includes/admin/import/class-batch-import.php
CHANGED
@@ -268,4 +268,4 @@ class EDD_Batch_Import {
|
|
268 |
return $str;
|
269 |
|
270 |
}
|
271 |
-
}
|
268 |
return $str;
|
269 |
|
270 |
}
|
271 |
+
}
|
includes/discount-functions.php
CHANGED
@@ -1584,7 +1584,7 @@ function edd_discount_status_cleanup() {
|
|
1584 |
),
|
1585 |
array(
|
1586 |
'key' => '_edd_discount_expiration',
|
1587 |
-
'value' => current_time( '
|
1588 |
'compare' => '<',
|
1589 |
),
|
1590 |
),
|
1584 |
),
|
1585 |
array(
|
1586 |
'key' => '_edd_discount_expiration',
|
1587 |
+
'value' => date( 'm/d/Y H:i:s', current_time( 'timestamp' ) ),
|
1588 |
'compare' => '<',
|
1589 |
),
|
1590 |
),
|
includes/download-functions.php
CHANGED
@@ -955,18 +955,18 @@ function edd_get_file_price_condition( $download_id = 0, $file_key ) {
|
|
955 |
|
956 |
/**
|
957 |
* Get Download File Url
|
958 |
-
* Constructs
|
959 |
*
|
960 |
* @since 1.0
|
961 |
*
|
962 |
-
* @param string
|
963 |
-
* @param string
|
964 |
-
* @param int
|
965 |
-
* @param int
|
966 |
-
* @param bool
|
967 |
*
|
968 |
-
* @return string
|
969 |
-
*/
|
970 |
function edd_get_download_file_url( $key, $email, $filekey, $download_id = 0, $price_id = false ) {
|
971 |
|
972 |
$hours = absint( edd_get_option( 'download_link_expiration', 24 ) );
|
955 |
|
956 |
/**
|
957 |
* Get Download File Url
|
958 |
+
* Constructs a secure file download url for a specific file.
|
959 |
*
|
960 |
* @since 1.0
|
961 |
*
|
962 |
+
* @param string $key Payment key. Use edd_get_payment_key() to get key.
|
963 |
+
* @param string $email Customer email address. Use edd_get_payment_user_email() to get user email.
|
964 |
+
* @param int $filekey Index of array of files returned by edd_get_download_files() that this download link is for.
|
965 |
+
* @param int $download_id Optional. ID of download this download link is for. Default is 0.
|
966 |
+
* @param bool|int $price_id Optional. Price ID when using variable prices. Default is false.
|
967 |
*
|
968 |
+
* @return string A secure download URL
|
969 |
+
*/
|
970 |
function edd_get_download_file_url( $key, $email, $filekey, $download_id = 0, $price_id = false ) {
|
971 |
|
972 |
$hours = absint( edd_get_option( 'download_link_expiration', 24 ) );
|
includes/gateways/functions.php
CHANGED
@@ -44,7 +44,7 @@ function edd_get_payment_gateways() {
|
|
44 |
*/
|
45 |
function edd_get_enabled_payment_gateways( $sort = false ) {
|
46 |
$gateways = edd_get_payment_gateways();
|
47 |
-
$enabled = edd_get_option( 'gateways', false );
|
48 |
|
49 |
$gateway_list = array();
|
50 |
|
44 |
*/
|
45 |
function edd_get_enabled_payment_gateways( $sort = false ) {
|
46 |
$gateways = edd_get_payment_gateways();
|
47 |
+
$enabled = (array) edd_get_option( 'gateways', false );
|
48 |
|
49 |
$gateway_list = array();
|
50 |
|
includes/misc-functions.php
CHANGED
@@ -747,6 +747,12 @@ function edd_object_to_array( $object = array() ) {
|
|
747 |
$return = $object->array_convert();
|
748 |
} else {
|
749 |
$return = get_object_vars( $object );
|
|
|
|
|
|
|
|
|
|
|
|
|
750 |
}
|
751 |
}
|
752 |
|
747 |
$return = $object->array_convert();
|
748 |
} else {
|
749 |
$return = get_object_vars( $object );
|
750 |
+
|
751 |
+
// Now look at the items that came back and convert any nested objects to arrays
|
752 |
+
foreach ( $return as $key => $value ) {
|
753 |
+
$value = ( is_array( $value ) || is_object( $value ) ) ? edd_object_to_array( $value ) : $value;
|
754 |
+
$return[ $key ] = $value;
|
755 |
+
}
|
756 |
}
|
757 |
}
|
758 |
|
languages/easy-digital-downloads-af.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-am.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-an.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ar.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ary.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-az.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-azb.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-bel.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-bg_BG.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-bn_BD.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-bs_BA.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ca.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ceb.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-cs_CZ.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-cy.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-da_DK.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-de_CH.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-de_DE.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-el.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-en_ZA.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-eo.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-es_AR.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-es_CL.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-es_ES.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-es_MX.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-es_PE.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-es_VE.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-et.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-eu.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-fa_IR.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-fi.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-fo.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-fr_CA.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-fr_FR.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-fy.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ga.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-gd.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-gl_ES.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-he_IL.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-hi_IN.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-hr.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-hu_HU.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-id_ID.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-is_IS.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-it_IT.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ja.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-jv_ID.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ka_GE.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-kk.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-km.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-kn.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ko_KR.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ky_KY.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-lo.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-lt_LT.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-lv.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-mg_MG.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-mk_MK.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-mn.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ms_MY.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-my_MM.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-nb_NO.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ne_NP.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-nl_NL.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-nn_NO.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-os.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-pa_IN.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-pl_PL.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ps.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-pt_BR.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-pt_PT.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ro_RO.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ru_RU.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-si_LK.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-sk_SK.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-sl_SI.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-snd.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-so_SO.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-sq.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-sr_RS.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-su_ID.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-sv_SE.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-sw.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ta_LK.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-te.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-th.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-tl.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-tr_TR.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ug_CN.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-uk.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-ur.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-vi.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-zh_CN.mo
CHANGED
Binary file
|
languages/easy-digital-downloads-zh_TW.mo
CHANGED
Binary file
|
languages/easy-digital-downloads.pot
CHANGED
@@ -2,16 +2,16 @@
|
|
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\n"
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
-
"POT-Creation-Date: 2016-06-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: WP-Translations (http://wp-translations.org/)\n"
|
13 |
"Language-Team: WP-Translations <wpt@wp-translations.org>\n"
|
14 |
-
"X-Generator: grunt-wp-i18n 0.5.
|
15 |
"X-Poedit-KeywordsList: "
|
16 |
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
17 |
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
@@ -28,21 +28,21 @@ msgstr ""
|
|
28 |
msgid "Cheatin’ huh?"
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/EDD_SL_Plugin_Updater.php:
|
32 |
msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/EDD_SL_Plugin_Updater.php:
|
36 |
msgid ""
|
37 |
"There is a new version of %1$s available. %2$sView version %3$s details%4$s "
|
38 |
"or %5$supdate now%6$s."
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/EDD_SL_Plugin_Updater.php:
|
42 |
msgid "You do not have permission to install plugin updates"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: includes/EDD_SL_Plugin_Updater.php:
|
46 |
#: includes/admin/customers/customer-actions.php:284
|
47 |
#: includes/admin/customers/customer-actions.php:328
|
48 |
#: includes/admin/customers/customer-actions.php:586
|
@@ -81,14 +81,14 @@ msgstr ""
|
|
81 |
#: includes/admin/tools/class-edd-tools-recount-store-earnings.php:154
|
82 |
#: includes/admin/tools/class-edd-tools-reset-stats.php:180
|
83 |
#: includes/admin/tools.php:901 includes/admin/tools.php:907
|
84 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
85 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
86 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
87 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
88 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
89 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
90 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
91 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
92 |
#: includes/api/class-edd-api.php:1836 includes/api/class-edd-api.php:1841
|
93 |
#: includes/api/class-edd-api.php:1853 includes/api/class-edd-api.php:1855
|
94 |
#: includes/cart/functions.php:1178 includes/cart/functions.php:1195
|
@@ -4486,7 +4486,7 @@ msgstr ""
|
|
4486 |
msgid "Please upload a file to import"
|
4487 |
msgstr ""
|
4488 |
|
4489 |
-
#: includes/admin/tracking.php:
|
4490 |
msgid ""
|
4491 |
"Allow Easy Digital Downloads to track plugin usage? Opt-in to tracking and "
|
4492 |
"our newsletter and immediately be emailed a 20%% discount to the EDD shop, "
|
@@ -4494,100 +4494,100 @@ msgid ""
|
|
4494 |
"extensions</a>. No sensitive data is tracked."
|
4495 |
msgstr ""
|
4496 |
|
4497 |
-
#: includes/admin/tracking.php:
|
4498 |
msgid "Allow"
|
4499 |
msgstr ""
|
4500 |
|
4501 |
-
#: includes/admin/tracking.php:
|
4502 |
msgid "Do not allow"
|
4503 |
msgstr ""
|
4504 |
|
4505 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4506 |
msgid "The Payment History needs to be updated. %s"
|
4507 |
msgstr ""
|
4508 |
|
4509 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4510 |
msgid "Click to Upgrade"
|
4511 |
msgstr ""
|
4512 |
|
4513 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4514 |
msgid ""
|
4515 |
"The Purchase and File Download History in Easy Digital Downloads needs to "
|
4516 |
"be upgraded, click %shere%s to start the upgrade."
|
4517 |
msgstr ""
|
4518 |
|
4519 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4520 |
msgid ""
|
4521 |
"Easy Digital Downloads needs to upgrade the plugin pages, click %shere%s to "
|
4522 |
"start the upgrade."
|
4523 |
msgstr ""
|
4524 |
|
4525 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4526 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4527 |
msgid ""
|
4528 |
"Easy Digital Downloads needs to upgrade the database, click %shere%s to "
|
4529 |
"start the upgrade."
|
4530 |
msgstr ""
|
4531 |
|
4532 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4533 |
msgid ""
|
4534 |
"Easy Digital Downloads needs to complete a database upgrade that was "
|
4535 |
"previously started, click <a href=\"%s\">here</a> to resume the upgrade."
|
4536 |
msgstr ""
|
4537 |
|
4538 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4539 |
msgid ""
|
4540 |
"Easy Digital Downloads needs to upgrade past order numbers to make them "
|
4541 |
"sequential, click <a href=\"%s\">here</a> to start the upgrade."
|
4542 |
msgstr ""
|
4543 |
|
4544 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4545 |
msgid ""
|
4546 |
"Easy Digital Downloads needs to upgrade the customer database, click "
|
4547 |
"%shere%s to start the upgrade."
|
4548 |
msgstr ""
|
4549 |
|
4550 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4551 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4552 |
msgid ""
|
4553 |
"Easy Digital Downloads needs to upgrade the payment database, click <a "
|
4554 |
"href=\"%s\">here</a> to start the upgrade."
|
4555 |
msgstr ""
|
4556 |
|
4557 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4558 |
msgid ""
|
4559 |
"Easy Digital Downloads needs to upgrade the customer database, click <a "
|
4560 |
"href=\"%s\">here</a> to start the upgrade."
|
4561 |
msgstr ""
|
4562 |
|
4563 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4564 |
msgid ""
|
4565 |
"Easy Digital Downloads needs to upgrade the API Key database, click <a "
|
4566 |
"href=\"%s\">here</a> to start the upgrade."
|
4567 |
msgstr ""
|
4568 |
|
4569 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4570 |
msgid ""
|
4571 |
"Easy Digital Downloads needs to upgrade the payments database, click <a "
|
4572 |
"href=\"%s\">here</a> to start the upgrade."
|
4573 |
msgstr ""
|
4574 |
|
4575 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4576 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4577 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4578 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4579 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4580 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4581 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4582 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4583 |
msgid "You do not have permission to do shop upgrades"
|
4584 |
msgstr ""
|
4585 |
|
4586 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4587 |
msgid "Transaction Failed"
|
4588 |
msgstr ""
|
4589 |
|
4590 |
-
#: includes/admin/upgrades/upgrade-functions.php:
|
4591 |
msgid "Your transaction failed, please try again or contact site support."
|
4592 |
msgstr ""
|
4593 |
|
@@ -6621,19 +6621,19 @@ msgstr ""
|
|
6621 |
msgid "PayPal Refund Transaction ID: %s"
|
6622 |
msgstr ""
|
6623 |
|
6624 |
-
#: includes/gateways/paypal-standard.php:
|
6625 |
msgid "Refund Payment in PayPal"
|
6626 |
msgstr ""
|
6627 |
|
6628 |
-
#: includes/gateways/paypal-standard.php:
|
6629 |
msgid "PayPal refund failed for unknown reason."
|
6630 |
msgstr ""
|
6631 |
|
6632 |
-
#: includes/gateways/paypal-standard.php:
|
6633 |
msgid "PayPal refund transaction ID: %s"
|
6634 |
msgstr ""
|
6635 |
|
6636 |
-
#: includes/gateways/paypal-standard.php:
|
6637 |
msgid "PayPal refund failed: %s"
|
6638 |
msgstr ""
|
6639 |
|
@@ -7400,47 +7400,47 @@ msgstr ""
|
|
7400 |
msgid "Excluding %1$s% tax"
|
7401 |
msgstr ""
|
7402 |
|
7403 |
-
#: includes/template-functions.php:
|
7404 |
msgid "White"
|
7405 |
msgstr ""
|
7406 |
|
7407 |
-
#: includes/template-functions.php:
|
7408 |
msgid "Gray"
|
7409 |
msgstr ""
|
7410 |
|
7411 |
-
#: includes/template-functions.php:
|
7412 |
msgid "Blue"
|
7413 |
msgstr ""
|
7414 |
|
7415 |
-
#: includes/template-functions.php:
|
7416 |
msgid "Red"
|
7417 |
msgstr ""
|
7418 |
|
7419 |
-
#: includes/template-functions.php:
|
7420 |
msgid "Green"
|
7421 |
msgstr ""
|
7422 |
|
7423 |
-
#: includes/template-functions.php:
|
7424 |
msgid "Yellow"
|
7425 |
msgstr ""
|
7426 |
|
7427 |
-
#: includes/template-functions.php:
|
7428 |
msgid "Orange"
|
7429 |
msgstr ""
|
7430 |
|
7431 |
-
#: includes/template-functions.php:
|
7432 |
msgid "Dark Gray"
|
7433 |
msgstr ""
|
7434 |
|
7435 |
-
#: includes/template-functions.php:
|
7436 |
msgid "Inherit"
|
7437 |
msgstr ""
|
7438 |
|
7439 |
-
#: includes/template-functions.php:
|
7440 |
msgid "Button"
|
7441 |
msgstr ""
|
7442 |
|
7443 |
-
#: includes/template-functions.php:
|
7444 |
msgid "Plain Text"
|
7445 |
msgstr ""
|
7446 |
|
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.2\n"
|
6 |
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\n"
|
7 |
+
"POT-Creation-Date: 2016-06-30 21:21:21+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: WP-Translations (http://wp-translations.org/)\n"
|
13 |
"Language-Team: WP-Translations <wpt@wp-translations.org>\n"
|
14 |
+
"X-Generator: grunt-wp-i18n 0.5.0\n"
|
15 |
"X-Poedit-KeywordsList: "
|
16 |
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
17 |
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
28 |
msgid "Cheatin’ huh?"
|
29 |
msgstr ""
|
30 |
|
31 |
+
#: includes/EDD_SL_Plugin_Updater.php:189
|
32 |
msgid "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: includes/EDD_SL_Plugin_Updater.php:197
|
36 |
msgid ""
|
37 |
"There is a new version of %1$s available. %2$sView version %3$s details%4$s "
|
38 |
"or %5$supdate now%6$s."
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: includes/EDD_SL_Plugin_Updater.php:351
|
42 |
msgid "You do not have permission to install plugin updates"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: includes/EDD_SL_Plugin_Updater.php:351
|
46 |
#: includes/admin/customers/customer-actions.php:284
|
47 |
#: includes/admin/customers/customer-actions.php:328
|
48 |
#: includes/admin/customers/customer-actions.php:586
|
81 |
#: includes/admin/tools/class-edd-tools-recount-store-earnings.php:154
|
82 |
#: includes/admin/tools/class-edd-tools-reset-stats.php:180
|
83 |
#: includes/admin/tools.php:901 includes/admin/tools.php:907
|
84 |
+
#: includes/admin/upgrades/upgrade-functions.php:210
|
85 |
+
#: includes/admin/upgrades/upgrade-functions.php:526
|
86 |
+
#: includes/admin/upgrades/upgrade-functions.php:608
|
87 |
+
#: includes/admin/upgrades/upgrade-functions.php:719
|
88 |
+
#: includes/admin/upgrades/upgrade-functions.php:816
|
89 |
+
#: includes/admin/upgrades/upgrade-functions.php:890
|
90 |
+
#: includes/admin/upgrades/upgrade-functions.php:1018
|
91 |
+
#: includes/admin/upgrades/upgrade-functions.php:1103
|
92 |
#: includes/api/class-edd-api.php:1836 includes/api/class-edd-api.php:1841
|
93 |
#: includes/api/class-edd-api.php:1853 includes/api/class-edd-api.php:1855
|
94 |
#: includes/cart/functions.php:1178 includes/cart/functions.php:1195
|
4486 |
msgid "Please upload a file to import"
|
4487 |
msgstr ""
|
4488 |
|
4489 |
+
#: includes/admin/tracking.php:264
|
4490 |
msgid ""
|
4491 |
"Allow Easy Digital Downloads to track plugin usage? Opt-in to tracking and "
|
4492 |
"our newsletter and immediately be emailed a 20%% discount to the EDD shop, "
|
4494 |
"extensions</a>. No sensitive data is tracked."
|
4495 |
msgstr ""
|
4496 |
|
4497 |
+
#: includes/admin/tracking.php:265
|
4498 |
msgid "Allow"
|
4499 |
msgstr ""
|
4500 |
|
4501 |
+
#: includes/admin/tracking.php:266
|
4502 |
msgid "Do not allow"
|
4503 |
msgstr ""
|
4504 |
|
4505 |
+
#: includes/admin/upgrades/upgrade-functions.php:83
|
4506 |
msgid "The Payment History needs to be updated. %s"
|
4507 |
msgstr ""
|
4508 |
|
4509 |
+
#: includes/admin/upgrades/upgrade-functions.php:83
|
4510 |
msgid "Click to Upgrade"
|
4511 |
msgstr ""
|
4512 |
|
4513 |
+
#: includes/admin/upgrades/upgrade-functions.php:89
|
4514 |
msgid ""
|
4515 |
"The Purchase and File Download History in Easy Digital Downloads needs to "
|
4516 |
"be upgraded, click %shere%s to start the upgrade."
|
4517 |
msgstr ""
|
4518 |
|
4519 |
+
#: includes/admin/upgrades/upgrade-functions.php:97
|
4520 |
msgid ""
|
4521 |
"Easy Digital Downloads needs to upgrade the plugin pages, click %shere%s to "
|
4522 |
"start the upgrade."
|
4523 |
msgstr ""
|
4524 |
|
4525 |
+
#: includes/admin/upgrades/upgrade-functions.php:105
|
4526 |
+
#: includes/admin/upgrades/upgrade-functions.php:113
|
4527 |
msgid ""
|
4528 |
"Easy Digital Downloads needs to upgrade the database, click %shere%s to "
|
4529 |
"start the upgrade."
|
4530 |
msgstr ""
|
4531 |
|
4532 |
+
#: includes/admin/upgrades/upgrade-functions.php:125
|
4533 |
msgid ""
|
4534 |
"Easy Digital Downloads needs to complete a database upgrade that was "
|
4535 |
"previously started, click <a href=\"%s\">here</a> to resume the upgrade."
|
4536 |
msgstr ""
|
4537 |
|
4538 |
+
#: includes/admin/upgrades/upgrade-functions.php:136
|
4539 |
msgid ""
|
4540 |
"Easy Digital Downloads needs to upgrade past order numbers to make them "
|
4541 |
"sequential, click <a href=\"%s\">here</a> to start the upgrade."
|
4542 |
msgstr ""
|
4543 |
|
4544 |
+
#: includes/admin/upgrades/upgrade-functions.php:143
|
4545 |
msgid ""
|
4546 |
"Easy Digital Downloads needs to upgrade the customer database, click "
|
4547 |
"%shere%s to start the upgrade."
|
4548 |
msgstr ""
|
4549 |
|
4550 |
+
#: includes/admin/upgrades/upgrade-functions.php:151
|
4551 |
+
#: includes/admin/upgrades/upgrade-functions.php:165
|
4552 |
msgid ""
|
4553 |
"Easy Digital Downloads needs to upgrade the payment database, click <a "
|
4554 |
"href=\"%s\">here</a> to start the upgrade."
|
4555 |
msgstr ""
|
4556 |
|
4557 |
+
#: includes/admin/upgrades/upgrade-functions.php:158
|
4558 |
msgid ""
|
4559 |
"Easy Digital Downloads needs to upgrade the customer database, click <a "
|
4560 |
"href=\"%s\">here</a> to start the upgrade."
|
4561 |
msgstr ""
|
4562 |
|
4563 |
+
#: includes/admin/upgrades/upgrade-functions.php:172
|
4564 |
msgid ""
|
4565 |
"Easy Digital Downloads needs to upgrade the API Key database, click <a "
|
4566 |
"href=\"%s\">here</a> to start the upgrade."
|
4567 |
msgstr ""
|
4568 |
|
4569 |
+
#: includes/admin/upgrades/upgrade-functions.php:179
|
4570 |
msgid ""
|
4571 |
"Easy Digital Downloads needs to upgrade the payments database, click <a "
|
4572 |
"href=\"%s\">here</a> to start the upgrade."
|
4573 |
msgstr ""
|
4574 |
|
4575 |
+
#: includes/admin/upgrades/upgrade-functions.php:210
|
4576 |
+
#: includes/admin/upgrades/upgrade-functions.php:526
|
4577 |
+
#: includes/admin/upgrades/upgrade-functions.php:608
|
4578 |
+
#: includes/admin/upgrades/upgrade-functions.php:719
|
4579 |
+
#: includes/admin/upgrades/upgrade-functions.php:816
|
4580 |
+
#: includes/admin/upgrades/upgrade-functions.php:890
|
4581 |
+
#: includes/admin/upgrades/upgrade-functions.php:1018
|
4582 |
+
#: includes/admin/upgrades/upgrade-functions.php:1103
|
4583 |
msgid "You do not have permission to do shop upgrades"
|
4584 |
msgstr ""
|
4585 |
|
4586 |
+
#: includes/admin/upgrades/upgrade-functions.php:379 includes/install.php:116
|
4587 |
msgid "Transaction Failed"
|
4588 |
msgstr ""
|
4589 |
|
4590 |
+
#: includes/admin/upgrades/upgrade-functions.php:380 includes/install.php:117
|
4591 |
msgid "Your transaction failed, please try again or contact site support."
|
4592 |
msgstr ""
|
4593 |
|
6621 |
msgid "PayPal Refund Transaction ID: %s"
|
6622 |
msgstr ""
|
6623 |
|
6624 |
+
#: includes/gateways/paypal-standard.php:817
|
6625 |
msgid "Refund Payment in PayPal"
|
6626 |
msgstr ""
|
6627 |
|
6628 |
+
#: includes/gateways/paypal-standard.php:966
|
6629 |
msgid "PayPal refund failed for unknown reason."
|
6630 |
msgstr ""
|
6631 |
|
6632 |
+
#: includes/gateways/paypal-standard.php:976
|
6633 |
msgid "PayPal refund transaction ID: %s"
|
6634 |
msgstr ""
|
6635 |
|
6636 |
+
#: includes/gateways/paypal-standard.php:980
|
6637 |
msgid "PayPal refund failed: %s"
|
6638 |
msgstr ""
|
6639 |
|
7400 |
msgid "Excluding %1$s% tax"
|
7401 |
msgstr ""
|
7402 |
|
7403 |
+
#: includes/template-functions.php:449
|
7404 |
msgid "White"
|
7405 |
msgstr ""
|
7406 |
|
7407 |
+
#: includes/template-functions.php:453
|
7408 |
msgid "Gray"
|
7409 |
msgstr ""
|
7410 |
|
7411 |
+
#: includes/template-functions.php:457
|
7412 |
msgid "Blue"
|
7413 |
msgstr ""
|
7414 |
|
7415 |
+
#: includes/template-functions.php:461
|
7416 |
msgid "Red"
|
7417 |
msgstr ""
|
7418 |
|
7419 |
+
#: includes/template-functions.php:465
|
7420 |
msgid "Green"
|
7421 |
msgstr ""
|
7422 |
|
7423 |
+
#: includes/template-functions.php:469
|
7424 |
msgid "Yellow"
|
7425 |
msgstr ""
|
7426 |
|
7427 |
+
#: includes/template-functions.php:473
|
7428 |
msgid "Orange"
|
7429 |
msgstr ""
|
7430 |
|
7431 |
+
#: includes/template-functions.php:477
|
7432 |
msgid "Dark Gray"
|
7433 |
msgstr ""
|
7434 |
|
7435 |
+
#: includes/template-functions.php:481
|
7436 |
msgid "Inherit"
|
7437 |
msgstr ""
|
7438 |
|
7439 |
+
#: includes/template-functions.php:499
|
7440 |
msgid "Button"
|
7441 |
msgstr ""
|
7442 |
|
7443 |
+
#: includes/template-functions.php:500
|
7444 |
msgid "Plain Text"
|
7445 |
msgstr ""
|
7446 |
|
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.6
|
9 |
-
Stable Tag: 2.6.
|
10 |
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
@@ -214,6 +214,15 @@ Yes, through the addition of one or more of the add-on payment gateways, you can
|
|
214 |
|
215 |
== Changelog ==
|
216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
= 2.6.2, June 28, 2016 =
|
218 |
* Fix: Existing guest customers cannot register a user account on checkout using the email address associated with their existing customer profile.
|
219 |
* Fix: DocBloc for edd_delete_option function is incorrect.
|
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.6
|
9 |
+
Stable Tag: 2.6.3
|
10 |
|
11 |
License: GNU Version 2 or Any Later Version
|
12 |
|
214 |
|
215 |
== Changelog ==
|
216 |
|
217 |
+
= 2.6.3, June 30, 2016 =
|
218 |
+
|
219 |
+
* Fix: Product name needs to be trimmed during payment import to prevent duplicate products being created
|
220 |
+
* Fix: Discount codes getting erroneously marked as Inactive
|
221 |
+
* Fix: Importing settings causes a fatal error
|
222 |
+
* Fix: Address Line 2 erroneously marked as required in some cases
|
223 |
+
* Tweak: Improved inline documentation for edd_get_download_file_url()
|
224 |
+
* Tweak: Add-on updater updated to 1.6.4
|
225 |
+
|
226 |
= 2.6.2, June 28, 2016 =
|
227 |
* Fix: Existing guest customers cannot register a user account on checkout using the email address associated with their existing customer profile.
|
228 |
* Fix: DocBloc for edd_delete_option function is incorrect.
|