Headline
CVE-2022-0707: Changeset 2697388 – WordPress Plugin Repository
The Easy Digital Downloads WordPress plugin before 2.11.6 does not have CSRF check in place when inserting payment notes, which could allow attackers to make a logged admin insert arbitrary notes via a CSRF attack
easy-digital-downloads/tags/2.11.6/assets/js/admin-scripts.js
r2667063
r2697388
748
748
action : 'edd\_insert\_payment\_note',
749
749
payment\_id : $(this).data('payment-id'),
750
nonce : $(this).data('nonce'),
750
751
note : $('#edd-payment-note').val()
751
752
};
easy-digital-downloads/tags/2.11.6/assets/js/admin-scripts.min.js
r2667063
r2697388
1
jQuery(document).ready(function($){edd\_attach\_tooltips($(".edd-help-tip"));var EDD\_Download\_Configuration={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone\_repeatable:function(row){var key;highest=1;return row.parent().find(".edd\_repeatable\_row").each(function(){var current=$(this).data("key");parseInt(current)>highest&&(highest=current)}),key=highest+=1,clone=row.clone(),clone.removeClass("edd\_add\_blank"),clone.attr("data-key",key),clone.find("input, select, textarea").val("").each(function(){var name=$(this).attr("name"),id=$(this).attr("id");name&&(name=name.replace(/\\\[(\\d+)\\\]/,"\["+parseInt(key)+"\]"),$(this).attr("name",name)),$(this).attr("data-key",key),void 0!==id&&(id=id.replace(/(\\d+)/,parseInt(key)),$(this).attr("id",id))}),clone.find("select").each(function(){$(this).val(row.find('select\[name="'+$(this).attr("name")+'"\]').val())}),clone.find('input\[type="checkbox"\]').each(function(){$(this).is(":checked")&&$(this).prop("checked",!1),$(this).val(1)}),clone.find("span.edd\_price\_id").each(function(){$(this).text(parseInt(key))}),clone.find("span.edd\_file\_id").each(function(){$(this).text(parseInt(key))}),clone.find(".edd\_repeatable\_default\_input").each(function(){$(this).val(parseInt(key)).removeAttr("checked")}),clone.find(".edd\_repeatable\_index").each(function(){$(this).val(parseInt(key))}),clone.find(".edd\_repeatable\_condition\_field").each(function(){$(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd\_attach\_tooltips(clone.find(".edd-help-tip")),clone},add:function(){$(document.body).on("click",".submit .edd\_add\_repeatable",function(clone){clone.preventDefault();var row=$(this).parent().parent().prev(".edd\_repeatable\_row"),clone=EDD\_Download\_Configuration.clone\_repeatable(row);clone.insertAfter(row).find("input, textarea, select").filter(":visible").eq(0).focus(),clone.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}),clone.find(".edd-select-chosen").css("width","100%"),clone.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd\_vars.search\_placeholder)})},move:function(){$(".edd\_repeatable\_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd\_repeatable\_row",opacity:.6,cursor:"move",axis:"y",update:function(){var count=0;$(this).find(".edd\_repeatable\_row").each(function(){$(this).find("input.edd\_repeatable\_index").each(function(){$(this).val(count)}),count++})}})},remove:function(){$(document.body).on("click",".edd-remove-row, .edd\_remove\_repeatable",function(firstFocusable){firstFocusable.preventDefault();var row=$(this).parents(".edd\_repeatable\_row"),count=row.parent().find(".edd\_repeatable\_row").length,type=$(this).data("type"),repeatable="div.edd\_repeatable\_"+type+"s",price\_row\_id=$(this).is(".ui-sortable .edd\_repeatable\_row:first-child .edd-remove-row, .ui-sortable .edd\_repeatable\_row:first-child .edd\_remove\_repeatable")?row.next(".edd\_repeatable\_row"):row.prev(".edd\_repeatable\_row"),firstFocusable=price\_row\_id.find("select, input, textarea, button").filter(":visible").eq(0);if("price"===type&&(price\_row\_id=row.data("key"),$('.edd\_repeatable\_condition\_field option\[value="'+price\_row\_id+'"\]').remove()),1<count)$("input, select",row).val(""),row.fadeOut("fast").remove(),firstFocusable.focus();else switch(type){case"price":alert(edd\_vars.one\_price\_min);break;case"file":$("input, select",row).val("");break;default:alert(edd\_vars.one\_field\_min)}$(repeatable).each(function(rowIndex){$(this).find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+rowIndex+"\]");$(this).attr("name",name).attr("id",name)})})})},type:function(){$(document.body).on("change","#\_edd\_product\_type",function(e){var edd\_products=$("#edd\_products"),edd\_download\_files=$("#edd\_download\_files"),edd\_download\_limit\_wrap=$("#edd\_download\_limit\_wrap");"bundle"===$(this).val()?(edd\_products.show(),edd\_download\_files.hide(),edd\_download\_limit\_wrap.hide()):(edd\_products.hide(),edd\_download\_files.show(),edd\_download\_limit\_wrap.show())})},prices:function(){$(document.body).on("change","#edd\_variable\_pricing",function(e){var checked=$(this).is(":checked"),single=$("#edd\_regular\_price\_field"),variable=$("#edd\_variable\_price\_fields, .edd\_repeatable\_table .pricing"),bundleRow=$(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");checked?(single.hide(),variable.show(),bundleRow.addClass("has-variable-pricing")):(single.show(),variable.hide(),bundleRow.removeClass("has-variable-pricing"))})},files:function(){var file\_frame;window.formfield="",$(document.body).on("click",".edd\_upload\_file\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).closest(".edd\_repeatable\_upload\_wrapper"),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader-title"),button:{text:button.data("uploader-button-text")},multiple:"0"!=$(this).data("multiple")})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,clone){var row,selectedSize="image"===(attachment=attachment.toJSON()).type&&$(".attachment-display-settings .size option:selected").val(),selectedURL=attachment.url,selectedName=0<attachment.title.length?attachment.title:attachment.filename;selectedSize&&void 0!==attachment.sizes\[selectedSize\]&&(selectedURL=attachment.sizes\[selectedSize\].url),"image"===attachment.type&&(selectedName=selectedSize&&void 0!==attachment.sizes\[selectedSize\]?selectedName+"-"+attachment.sizes\[selectedSize\].width+"x"+attachment.sizes\[selectedSize\].height:selectedName+"-"+attachment.width+"x"+attachment.height),0===clone?(window.formfield.find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),window.formfield.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),window.formfield.find(".edd\_repeatable\_upload\_field").val(selectedURL),window.formfield.find(".edd\_repeatable\_name\_field").val(selectedName)):(row=window.formfield,(clone=EDD\_Download\_Configuration.clone\_repeatable(row)).find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),clone.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),clone.find(".edd\_repeatable\_upload\_field").val(selectedURL),clone.find(".edd\_repeatable\_name\_field").val(selectedName),clone.insertAfter(row))})})),file\_frame.open()}),window.formfield=""},updatePrices:function(){$("#edd\_price\_fields").on("keyup",".edd\_variable\_prices\_name",function(){var key=$(this).parents(".edd\_repeatable\_row").data("key"),name=$(this).val(),field\_option=$(".edd\_repeatable\_condition\_field option\[value="+key+"\]");0<field\_option.length?field\_option.text(name):$(".edd\_repeatable\_condition\_field").append($("<option></option>").attr("value",key).text(name))})}};$(document.body).on("click",".toggle-custom-price-option-section",function(header){header.preventDefault();var show=$(this).html()==edd\_vars.show\_advanced\_settings;show?$(this).html(edd\_vars.hide\_advanced\_settings):$(this).html(edd\_vars.show\_advanced\_settings);header=$(this).parents(".edd-repeatable-row-header");header.siblings(".edd-custom-price-option-sections-wrap").slideToggle(),$(":input:not(input\[type=button\],input\[type=submit\],button):visible:first",show?header.siblings(".edd-custom-price-option-sections-wrap"):header.siblings(".edd-repeatable-row-standard-fields")).focus()}),EDD\_Download\_Configuration.init();var typingTimer,edd\_datepicker=$(".edd\_datepicker");0<edd\_datepicker.length&&edd\_datepicker.datepicker({dateFormat:"mm/dd/yy"}),{init:function(){this.edit\_address(),this.remove\_download(),this.add\_download(),this.change\_customer(),this.new\_customer(),this.edit\_price(),this.recalculate\_total(),this.variable\_prices\_check(),this.add\_note(),this.remove\_note(),this.resend\_receipt(),this.copy\_download\_link()},edit\_address:function(){$('select\[name="edd-payment-address\[0\]\[country\]"\]').change(function(){var data=$(this),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd-payment-address\[0\]\[state\]"};return $.post(ajaxurl,data,function(response){var state\_wrapper=$("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");$("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==response?state\_wrapper.replaceWith('<input type="text" name="edd-payment-address\[0\]\[state\]" value="" class="edd-edit-toggles medium-text"/>'):state\_wrapper.replaceWith(response)}),!1})},remove\_download:function(){$("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var key,download\_id,price\_id,quantity,amount,fees,currently\_removed;return 1===$(document.body).find("#edd-purchased-files > .row:not(.header)").length?alert(edd\_vars.one\_download\_min):confirm(edd\_vars.delete\_payment\_download)&&(key=$(this).data("key"),$(".edd-payment-id").val(),download\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[id\]"\]').val(),price\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[price\_id\]"\]').val(),quantity=$('input\[name="edd-payment-details-downloads\['+key+'\]\[quantity\]"\]').val(),amount=$('input\[name="edd-payment-details-downloads\['+key+'\]\[amount\]"\]').val(),$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').length&&(fees=$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').val()),$('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').length&&(fees=$.parseJSON($('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').val())),currently\_removed=$('input\[name="edd-payment-removed"\]').val(),(currently\_removed=(currently\_removed=$.parseJSON(currently\_removed)).length<1?{}:currently\_removed)\[key\]=\[{id:download\_id,price\_id:price\_id,quantity:quantity,amount:amount,cart\_index:key}\],$('input\[name="edd-payment-removed"\]').val(JSON.stringify(currently\_removed)),$(this).parent().parent().remove(),fees&&fees.length&&$.each(fees,function(key,value){$('\*li\[data-fee-id="'+value+'"\]').remove()}),$("#edd-payment-downloads-changed").val(1),$(".edd-order-payment-recalc-totals").show()),!1})},change\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(cancel){cancel.preventDefault();var change\_customer=$(this).hasClass("edd-payment-change-customer"),cancel=$(this).hasClass("edd-payment-change-customer-cancel");change\_customer?($(".customer-info").hide(),$(".change-customer").show(),$(".edd-payment-change-customer-input").css("width","auto")):cancel&&($(".customer-info").show(),$(".change-customer").hide())})},new\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(cancel){cancel.preventDefault();var new\_customer=$(this).hasClass("edd-payment-new-customer"),cancel=$(this).hasClass("edd-payment-new-customer-cancel");new\_customer?($(".customer-info").hide(),$(".new-customer").show()):cancel&&($(".customer-info").show(),$(".new-customer").hide());new\_customer=$("#edd-new-customer");$(".new-customer").is(":visible")?new\_customer.val(1):new\_customer.val(0)})},add\_download:function(){$(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(download\_title){download\_title.preventDefault();var quantity=$("#edd\_order\_download\_select"),item\_price=$("#edd-order-download-quantity"),item\_total=$("#edd-order-download-price"),price\_id=$("#edd-order-download-tax"),clone=$(".edd\_price\_options\_select option:selected"),download\_id=quantity.val(),download\_title=quantity.find(":selected").text(),quantity=item\_price.val(),item\_price=item\_total.val(),item\_total=price\_id.val(),price\_id=clone.val(),clone=clone.text();if(download\_id<1)return!1;if(item\_price=item\_price||0,item\_price=parseFloat(item\_price),isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;if(item\_total=parseFloat(item\_total),isNaN(item\_total))return alert(edd\_vars.numeric\_item\_tax),!1;if(isNaN(parseInt(quantity)))return alert(edd\_vars.numeric\_quantity),!1;clone&&(download\_title=download\_title+" - "+clone);var count=$("#edd-purchased-files div.row:not(.edd-purchased-files-header)").length;0==count&&alert(edd\_vars.no\_downloads\_error);clone=$("#edd-purchased-files div.row:not(.edd-purchased-files-header):last").clone();clone.find(".download span").html('<a href="post.php?post='+download\_id+'&action=edit"></a>'),clone.find(".download span a").text(download\_title),clone.find(".edd-payment-details-download-item-price").val(item\_price.toFixed(edd\_vars.currency\_decimals)),clone.find(".edd-payment-details-download-item-tax").val(item\_total.toFixed(edd\_vars.currency\_decimals)),clone.find("input.edd-payment-details-download-id").val(download\_id),clone.find("input.edd-payment-details-download-price-id").val(price\_id);item\_total=(item\_total=item\_price\*quantity+item\_total).toFixed(edd\_vars.currency\_decimals);clone.find("span.edd-payment-details-download-amount").text(item\_total),clone.find("input.edd-payment-details-download-amount").val(item\_total),clone.find("input.edd-payment-details-download-quantity").val(quantity),clone.find("input.edd-payment-details-download-has-log").val(0),clone.find(".edd-copy-download-link-wrapper").remove(),clone.find("input").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("a.edd-order-remove-download").attr("data-key",parseInt(count)),$("#edd-payment-downloads-changed").val(1),$("#edd-purchased-files div.row .edd-purchased-download-title .deleted").length&&$("#edd-purchased-files div.row:last").remove(),$(clone).insertAfter("#edd-purchased-files div.row:last"),$(".edd-order-payment-recalc-totals").show(),$(".edd-add-download-field").val("")})},edit\_price:function(){$(document.body).on("change keyup",".edd-payment-item-input",function(){var row=$(this).parents("ul.edd-purchased-files-list-wrapper");$(".edd-order-payment-recalc-totals").show();var quantity=row.find("input.edd-payment-details-download-quantity").val().replace(edd\_vars.thousands\_separator,""),item\_price=row.find("input.edd-payment-details-download-item-price").val().replace(edd\_vars.thousands\_separator,""),item\_total=row.find("input.edd-payment-details-download-item-tax").val().replace(edd\_vars.thousands\_separator,""),item\_price=parseFloat(item\_price);if(isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;item\_total=parseFloat(item\_total),isNaN(item\_total)&&(item\_total=0);item\_total=(item\_total=item\_price\*(quantity=isNaN(parseInt(quantity))?1:quantity)+item\_total).toFixed(edd\_vars.currency\_decimals);row.find("input.edd-payment-details-download-amount").val(item\_total),row.find("span.edd-payment-details-download-amount").text(item\_total)})},recalculate\_total:function(){$("#edd-order-recalc-total").on("click",function(taxes){taxes.preventDefault();var total=0,tax=0,totals=$("#edd-purchased-files .row input.edd-payment-details-download-amount"),taxes=$("#edd-purchased-files .row input.edd-payment-details-download-item-tax");totals.length&&totals.each(function(){total+=parseFloat($(this).val())}),taxes.length&&taxes.each(function(){tax+=parseFloat($(this).val())}),$(".edd-payment-fees").length&&$(".edd-payment-fees span.fee-amount").each(function(){total+=parseFloat($(this).data("fee"))}),$("input\[name=edd-payment-total\]").val(total.toFixed(edd\_vars.currency\_decimals)),$("input\[name=edd-payment-tax\]").val(tax.toFixed(edd\_vars.currency\_decimals))})},variable\_prices\_check:function(){$(".edd-edit-purchase-element").on("change","select#edd\_order\_download\_select",function(){var $this=$(this),download\_id=$this.val();0<parseInt(download\_id)&&$.ajax({type:"POST",data:{action:"edd\_check\_for\_download\_price\_variations",download\_id:download\_id},url:ajaxurl,success:function(response){$(".edd\_price\_options\_select").remove(),$(response).insertAfter($this.next())}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})},add\_note:function(){$("#edd-add-payment-note").on("click",function(postData){postData.preventDefault();var border\_color,postData={action:"edd\_insert\_payment\_note",payment\_id:$(this).data("payment-id"),note:$("#edd-payment-note").val()};postData.note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-payment-notes-inner").append(response),$(".edd-no-payment-notes").hide(),$("#edd-payment-note").val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=$("#edd-payment-note").css("border-color"),$("#edd-payment-note").css("border-color","red"),setTimeout(function(){$("#edd-payment-note").css("border-color",border\_color)},500))})},remove\_note:function(){$(document.body).on("click",".edd-delete-payment-note",function(e){if(e.preventDefault(),confirm(edd\_vars.delete\_payment\_note)){var postData={action:"edd\_delete\_payment\_note",payment\_id:$(this).data("payment-id"),note\_id:$(this).data("note-id")};return $.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){return $("#edd-payment-note-"+postData.note\_id).remove(),$(".edd-payment-note").length||$(".edd-no-payment-notes").show(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!0}})},resend\_receipt:function(){var emails\_wrap=$(".edd-order-resend-receipt-addresses");$(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),emails\_wrap.slideDown()}),$(document.body).on("change",".edd-order-resend-receipt-email",function(){var href=$("#edd-select-receipt-email").prop("href")+"&email="+$(this).val();confirm(edd\_vars.resend\_receipt)&&(window.location=href)}),$(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd\_vars.resend\_receipt)})},copy\_download\_link:function(){$(document.body).on("click",".edd-copy-download-link",function(postData){postData.preventDefault();postData=$(this),postData={action:"edd\_get\_file\_download\_link",payment\_id:$('input\[name="edd\_payment\_id"\]').val(),download\_id:postData.data("download-id"),price\_id:postData.data("price-id")};$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(link){return $("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+link+"</textarea>"),$("#edd-download-link-textarea").focus().select(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})}}.init(),{init:function(){this.type\_select(),this.product\_requirements()},type\_select:function(){$("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var val=$(this).val();$(".edd-amount-description").hide(),$(".edd-amount-description."+val+"-discount").show()})},product\_requirements:function(){$("#products").change(function(){var product\_conditions=$("#edd-discount-product-conditions");$(this).val()?product\_conditions.show():product\_conditions.hide()})}}.init(),{init:function(){this.date\_options(),this.customers\_export()},date\_options:function(){$("#edd-graphs-date-options").change(function(){var $this=$(this),date\_range\_options=$("#edd-date-range-options");"other"===$this.val()?date\_range\_options.show():date\_range\_options.hide()})},customers\_export:function(){$("#edd\_customer\_export\_download").change(function(){var price\_options\_select,$this=$(this),data=$("option:selected",$this).val(),customer\_export\_option=$("#edd\_customer\_export\_option");"0"===$this.val()?customer\_export\_option.show():customer\_export\_option.hide(),0!=parseInt(data)?(data={action:"edd\_check\_for\_download\_price\_variations",download\_id:data,all\_prices:!0},price\_options\_select=$(".edd\_price\_options\_select"),$.post(ajaxurl,data,function(response){price\_options\_select.remove(),$("#edd\_customer\_export\_download\_chosen").after(response)})):price\_options\_select.remove()})}}.init(),{init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var file\_frame,edd\_settings\_upload\_button=$(".edd-color-picker");edd\_settings\_upload\_button.length&&edd\_settings\_upload\_button.wpColorPicker(),"undefined"==typeof wp||"1"!==edd\_vars.new\_media\_ui?0<(edd\_settings\_upload\_button=$(".edd\_settings\_upload\_button")).length&&(window.formfield="",$(document.body).on("click",edd\_settings\_upload\_button,function(e){e.preventDefault(),window.formfield=$(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(html){window.formfield?(imgurl=$("a","<div>"+html+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe\_interval),tb\_remove()):window.edd\_send\_to\_editor(html),window.send\_to\_editor=window.edd\_send\_to\_editor,window.formfield="",window.imagefield=!1}):(window.formfield="",$(document.body).on("click",".edd\_settings\_upload\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).parent().prev(),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader\_title"),button:{text:button.data("uploader\_button\_text")},multiple:!1})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,index){attachment=attachment.toJSON(),window.formfield.val(attachment.url)})})),file\_frame.open()}),window.formfield="")},taxes:function(){var no\_states=$("select.edd-no-states");no\_states.length&&no\_states.closest("tr").addClass("hidden"),$('select\[name="edd\_settings\[base\_country\]"\]').change(function(){var data=$(this),$tr=data.closest("tr"),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd\_settings\[base\_state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?$tr.next().addClass("hidden"):($tr.next().removeClass("hidden"),$tr.next().find("select").replaceWith(response))}),!1}),$(document.body).on("change","#edd\_tax\_rates select.edd-tax-country",function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:$this.attr("name").replace("country","state")};return $.post(ajaxurl,data,function(response){var text\_field;"nostates"==response?(text\_field='<input type="text" name="'+data.field\_name+'" value=""/>',$this.parent().next().find("select").replaceWith(text\_field)):($this.parent().next().find("input,select").show(),$this.parent().next().find("input,select").replaceWith(response))}),!1}),$("#edd\_add\_tax\_rate").on("click",function(){var row=$("#edd\_tax\_rates tr:last"),clone=row.clone(),count=row.parent().find("tr").length;return clone.find("td input").not(":input\[type=checkbox\]").val(""),clone.find('td \[type="checkbox"\]').attr("checked",!1),clone.find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("label").each(function(){var name=(name=$(this).attr("for")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("for",name)}),clone.insertAfter(row),!1}),$(document.body).on("click","#edd\_tax\_rates .edd\_remove\_tax\_rate",function(){return confirm(edd\_vars.delete\_tax\_rate)&&(2===$("#edd\_tax\_rates tr:visible").length?($("#edd\_tax\_rates select").val(""),$('#edd\_tax\_rates input\[type="text"\]').val(""),$('#edd\_tax\_rates input\[type="number"\]').val(""),$('#edd\_tax\_rates input\[type="checkbox"\]').attr("checked",!1)):$(this).closest("tr").remove(),$("#edd\_tax\_rates tr").each(function(rowIndex){$(this).children().find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+(rowIndex-1)+"\]");$(this).attr("name",name).attr("id",name)})})),!1})},emails:function(){$("#edd-recapture-connect").on("click",function(e){e.preventDefault(),$(this).html(edd\_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy\_digital\_downloads\_recapture\_remote\_install()})},misc:function(){var downloadMethod=$('select\[name="edd\_settings\[download\_method\]"\]'),symlink=downloadMethod.parent().parent().next();"direct"==downloadMethod.val()&&(symlink.hide(),symlink.find("input").prop("checked",!1)),downloadMethod.on("change",function(){"direct"==$(this).val()?(symlink.hide(),symlink.find("input").prop("checked",!1)):symlink.show()})}}.init(),$(".download\_page\_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return!!confirm(edd\_vars.delete\_payment)}),$("body").on("click","#the-list .editinline",function(){var post\_id=(post\_id=$(this).closest("tr").attr("id")).replace("post-",""),regprice=$("#post-"+post\_id).find(".column-price .downloadprice-"+post\_id).val();regprice!=$("#post-"+post\_id+".column-price .downloadprice-"+post\_id).val()?$(".regprice","#edd-download-data").val(regprice).attr("disabled",!1):$(".regprice","#edd-download-data").val(edd\_vars.quick\_edit\_warning).attr("disabled","disabled")}),$(document.body).on("click","#bulk\_edit",function(){var $price=$("#bulk-edit"),$post\_ids=new Array;$price.find("#bulk-titles").children().each(function(){$post\_ids.push($(this).attr("id").replace(/^(ttle)/i,""))});$price=$('#edd-download-data input\[name="\_edd\_regprice"\]').val();$.post(ajaxurl,{action:"edd\_save\_bulk\_edit",edd\_bulk\_nonce:$post\_ids,post\_ids:$post\_ids,price:$price})}),$(".edd-select-chosen").chosen({inherit\_select\_classes:!0,placeholder\_text\_single:edd\_vars.one\_option,placeholder\_text\_multiple:edd\_vars.one\_or\_more\_option}),$(".edd-select-chosen .chosen-search input").each(function(){var placeholder=$(this).parent().parent().parent().prev("select.edd-select-chosen"),placeholder=(placeholder.data("search-type"),placeholder.data("search-placeholder"));$(this).attr("placeholder",placeholder)}),$(".chosen-choices").on("click",function(){var placeholder=$(this).parent().prev().data("search-placeholder");void 0===placeholder&&(placeholder=edd\_vars.type\_to\_search),$(this).children("li").children("input").attr("placeholder",placeholder)});$(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(lastKey){var val=$(this).val(),container=$(this).closest(".edd-select-chosen"),select=(container.attr("id").replace("\_chosen",""),container.prev()),no\_bundles=container.hasClass("no-bundles"),variations=container.hasClass("variations"),lastKey=lastKey.which,search\_type="edd\_download\_search";if(container.prev().data("search-type")){if("no\_ajax"==select.data("search-type"))return;search\_type="edd\_"+select.data("search-type")+"\_search"}val.length<=3&&"edd\_download\_search"==search\_type||16==lastKey||13==lastKey||91==lastKey||17==lastKey||37==lastKey||38==lastKey||39==lastKey||40==lastKey||(clearTimeout(typingTimer),typingTimer=setTimeout(function(){$.ajax({type:"GET",url:ajaxurl,data:{action:search\_type,s:val,no\_bundles:no\_bundles,variations:variations},dataType:"json",beforeSend:function(){select.closest("ul.chosen-results").empty()},success:function(data){$("option:not(:selected)",select).remove(),$.each(data,function(key,item){$('option\[value="'+item.id+'"\]',select).length||select.prepend('<option value="'+item.id+'">'+item.name+"</option>")}),$(".edd-select-chosen").trigger("chosen:updated"),select.next().find("input").val(val)}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){})},342))}),$("#post").on("click",".edd-thickbox",function(){$(".edd-select-chosen","#choose-download").css("width","100%")}),{init:function(){this.revoke\_api\_key(),this.regenerate\_api\_key(),this.create\_api\_key(),this.recount\_stats()},revoke\_api\_key:function(){$(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd\_vars.revoke\_api\_key)})},regenerate\_api\_key:function(){$(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd\_vars.regenerate\_api\_key)})},create\_api\_key:function(){$(document.body).on("submit","#api-key-generate-form",function(e){var input=$('input\[type="text"\]\[name="user\_id"\]');input.css("border-color","#ddd");var user\_id=input.val();if(user\_id.length<1||0==user\_id)return input.css("border-color","#ff0000"),!1})},recount\_stats:function(){$(document.body).on("change","#recount-stats-type",function(){var export\_form=$("#edd-tools-recount-form"),selected\_type=$("option:selected",this).data("type"),submit\_button=$("#recount-stats-submit"),products=$("#tools-product-dropdown");export\_form.find(".notice-wrap").remove(),submit\_button.removeClass("button-disabled").attr("disabled",!1),products.hide(),$(".edd-recount-stats-descriptions span").hide(),"recount-download"===selected\_type?(products.show(),products.find(".edd-select-chosen").css("width","auto")):"reset-stats"===selected\_type?(export\_form.append('<div class="notice-wrap"></div>'),export\_form.find(".notice-wrap").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>"),$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")):(products.hide(),products.val(0)),$("#"+selected\_type).show()}),$(document.body).on("change","#confirm-reset",function(){$(this).is(":checked")?$("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),$("#edd-tools-recount-form").submit(function(e){var selection=$("#recount-stats-type").val(),export\_form=$(this),selected\_type=$("option:selected",this).data("type");if("reset-stats"===selected\_type){if($("#confirm-reset").is(":checked"))return!0;has\_errors=!0}export\_form.find(".notice-wrap").remove(),export\_form.append('<div class="notice-wrap"></div>');var notice\_wrap=export\_form.find(".notice-wrap"),has\_errors=!1;if(null!==selection&&0!==selection||(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_class+"</p></div>"),has\_errors=!0),"recount-download"===selected\_type&&0==$('select\[name="download\_id"\]').val()&&(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_reqs+"</p></div>"),has\_errors=!0),has\_errors)return export\_form.find(".button-disabled").removeClass("button-disabled"),!1})}}.init(),{init:function(){this.submit(),this.dismiss\_message()},submit:function(){var self=this;$(document.body).on("submit",".edd-export-form",function(data){data.preventDefault();var submitButton=$(this).find('input\[type="submit"\]');submitButton.hasClass("button-disabled")||(data=$(this).serialize(),submitButton.addClass("button-disabled"),$(this).find(".notice-wrap").remove(),$(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),self.process\_step(1,data,self))})},process\_step:function(step,data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:data,action:"edd\_do\_ajax\_export",step:step},dataType:"json",success:function(response){var export\_form,notice\_wrap,success\_message;"done"==response.step||response.error||response.success?(notice\_wrap=(export\_form=$(".edd-export-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),export\_form.find(".button-disabled").removeClass("button-disabled"),response.error?(success\_message=response.message,notice\_wrap.html('<div class="updated error"><p>'+success\_message+"</p></div>")):response.success?(success\_message=response.message,notice\_wrap.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+success\_message+'<span class="notice-dismiss"></span></p></div>')):(notice\_wrap.remove(),window.location=response.url)):($(".edd-progress div").animate({width:response.percentage+"%"},50,function(){}),self.process\_step(parseInt(response.step),data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})},dismiss\_message:function(){$(document.body).on("click","#edd-batch-success .notice-dismiss",function(){$("#edd-batch-success").parent().slideUp("fast")})}}.init();var EDD\_Import={init:function(){this.submit()},submit:function(){$(".edd-import-form").ajaxForm({beforeSubmit:this.before\_submit,success:this.success,complete:this.complete,dataType:"json",error:this.error})},before\_submit:function(arr,notice\_wrap,options){if(notice\_wrap.find(".notice-wrap").remove(),notice\_wrap.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 import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");return import\_form.find(".button-disabled").removeClass("button-disabled"),notice\_wrap.html('<div class="update error"><p>'+edd\_vars.unsupported\_browser+"</p></div>"),!1}},success:function(responseText,statusText,xhr,$form){},complete:function(xhr){var $form,select,options,columns,response=jQuery.parseJSON(xhr.responseText);response.success?(($form=$(".edd-import-form .notice-wrap").parent()).find(".edd-import-file-wrap,.notice-wrap").remove(),$form.find(".edd-import-options").slideDown(),(select=$form.find("select.edd-import-csv-column")).parents("tr").first(),options="",columns=response.data.columns.sort(function(a,b){return a<b?-1:b<a?1:0}),$.each(columns,function(key,value){options+='<option value="'+value+'">'+value+"</option>"}),select.append(options),select.on("change",function(){var $key=$(this).val();$key&&0!=response.data.first\_row\[$key\]?$(this).parent().next().html(response.data.first\_row\[$key\]):$(this).parent().next().html("")}),$.each(select,function(){$(this).val($(this).attr("data-field")).change()}),$(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),$form.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),response.data.mapping=$form.serialize(),EDD\_Import.process\_step(1,response.data,self)})):EDD\_Import.error(xhr)},error:function(notice\_wrap){var response=jQuery.parseJSON(notice\_wrap.responseText),import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):notice\_wrap.remove()},process\_step:function(step,import\_data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:import\_data.form,nonce:import\_data.nonce,class:import\_data.class,upload:import\_data.upload,mapping:import\_data.mapping,action:"edd\_do\_ajax\_import",step:step},dataType:"json",success:function(response){var import\_form,notice\_wrap;"done"==response.data.step||response.data.error?(notice\_wrap=(import\_form=$(".edd-import-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):(import\_form.find(".edd-import-options").hide(),$("html, body").animate({scrollTop:import\_form.parent().offset().top},500),notice\_wrap.html('<div class="updated"><p>'+response.data.message+"</p></div>"))):($(".edd-progress div").animate({width:response.data.percentage+"%"},50,function(){}),EDD\_Import.process\_step(parseInt(response.data.step),import\_data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})}};EDD\_Import.init();var EDD\_Customer={vars:{customer\_card\_wrap\_editable:$(".edd-customer-card-wrapper .editable"),customer\_card\_wrap\_edit\_item:$(".edd-customer-card-wrapper .edit-item"),user\_id:$('input\[name="customerinfo\[user\_id\]"\]'),state\_input:$(':input\[name="customerinfo\[state\]"\]'),note:$("#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(){$(document.body).on("click","#edit-customer",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_editable.hide(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.fadeIn().css("display","block")})},add\_email:function(){$(document.body).on("click","#add-customer-email",function(nonce){nonce.preventDefault();var button=$(this),wrapper=button.parent();wrapper.parent().find(".notice-container").remove(),wrapper.find(".spinner").css("visibility","visible"),button.attr("disabled",!0);var customer\_id=wrapper.find('input\[name="customer-id"\]').val(),email=wrapper.find('input\[name="additional-email"\]').val(),primary=wrapper.find('input\[name="make-additional-primary"\]').is(":checked"),nonce=wrapper.find('input\[name="add\_email\_nonce"\]').val();$.post(ajaxurl,{edd\_action:"customer-add-email",customer\_id:customer\_id,email:email,primary:primary,\_wpnonce:nonce},function(response){!0===response.success?window.location.href=response.redirect:(button.attr("disabled",!1),wrapper.after('<div class="notice-container"><div class="notice notice-error inline"><p>'+response.message+"</p></div></div>"),wrapper.find(".spinner").css("visibility","hidden"))},"json")})},user\_search:function(){$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results a",function(user\_id){user\_id.preventDefault();user\_id=$(this).data("userid");EDD\_Customer.vars.user\_id.val(user\_id)})},remove\_user:function(){$(document.body).on("click","#disconnect-customer",function(postData){postData.preventDefault(),confirm(edd\_vars.disconnect\_customer)&&(postData={edd\_action:"disconnect-userid",customer\_id:$('input\[name="customerinfo\[id\]"\]').val(),\_wpnonce:$("#edit-customer-info #\_wpnonce").val()},$.post(ajaxurl,postData,function(response){window.location.href=window.location.href},"json"))})},cancel\_edit:function(){$(document.body).on("click","#edd-edit-customer-cancel",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.hide(),EDD\_Customer.vars.customer\_card\_wrap\_editable.show(),$(".edd\_user\_search\_results").html("")})},change\_country:function(){$('select\[name="customerinfo\[country\]"\]').change(function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:"customerinfo\[state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?EDD\_Customer.vars.state\_input.replaceWith('<input type="text" name="'+data.field\_name+'" value="" class="edd-edit-toggles medium-text"/>'):EDD\_Customer.vars.state\_input.replaceWith(response)}),!1})},add\_note:function(){$(document.body).on("click","#add-customer-note",function(postData){postData.preventDefault();var border\_color,postData={edd\_action:"add-customer-note",customer\_id:$("#customer-id").val(),customer\_note:EDD\_Customer.vars.note.val(),add\_customer\_note\_nonce:$("#add\_customer\_note\_nonce").val()};postData.customer\_note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-customer-notes").prepend(response),$(".edd-no-customer-notes").hide(),EDD\_Customer.vars.note.val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=EDD\_Customer.vars.note.css("border-color"),EDD\_Customer.vars.note.css("border-color","red"),setTimeout(function(){EDD\_Customer.vars.note.css("border-color",border\_color)},500))})},delete\_checked:function(){$("#edd-customer-delete-confirm").change(function(){var records\_input=$("#edd-customer-delete-records"),submit\_button=$("#edd-delete-customer");$(this).prop("checked")?(records\_input.attr("disabled",!1),submit\_button.attr("disabled",!1)):(records\_input.attr("disabled",!0),records\_input.prop("checked",!1),submit\_button.attr("disabled",!0))})}};EDD\_Customer.init();var EDD\_Promo\_Notices={init:function(){EDD\_Promo\_Notices.displayNotices(),EDD\_Promo\_Notices.dismissNotices()},displayNotices:function(){var topOfPageNoticeEl,topOfPageNotice=$(".edd-admin-notice-top-of-page");topOfPageNotice&&(topOfPageNoticeEl=topOfPageNotice.detach(),$("#wpbody-content").prepend(topOfPageNoticeEl),topOfPageNotice.delay(1e3).slideDown())},dismissNotices:function(){$(".edd-promo-notice").each(function(){var notice=$(this);notice.on("click",".edd-promo-notice-dismiss",function(e){$(this).attr("href")||e.preventDefault(),$.ajax({type:"POST",data:{action:"edd\_dismiss\_promo\_notice",notice\_id:notice.data("id"),nonce:notice.data("nonce"),lifespan:notice.data("lifespan")},url:ajaxurl,success:function(response){notice.slideUp()}})})})}};EDD\_Promo\_Notices.init(),$(".edd-ajax-user-search").keyup(function(){var user\_search=$(this).val(),data="";$(this).data("exclude")&&(data=$(this).data("exclude")),$(".edd-ajax").show();data={action:"edd\_search\_users",user\_name:user\_search,exclude:data};document.body.style.cursor="wait",$.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(search\_response){$(".edd-ajax").hide(),$(".edd\_user\_search\_results").removeClass("hidden"),$(".edd\_user\_search\_results span").html(""),$(search\_response.results).appendTo(".edd\_user\_search\_results span"),document.body.style.cursor="default"}})}),$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results span a",function(login){login.preventDefault();login=$(this).data("login");$(".edd-ajax-user-search").val(login),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$(document.body).on("click.eddCancelUserSearch",".edd\_user\_search\_results a.edd-ajax-user-cancel",function(e){e.preventDefault(),$(".edd-ajax-user-search").val(""),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$("#edd\_dashboard\_sales").length&&$.ajax({type:"GET",data:{action:"edd\_load\_dashboard\_widget"},url:ajaxurl,success:function(response){$("#edd\_dashboard\_sales .edd-loading").html(response)}}),$(document.body).on("keydown",".customer-note-input",function(e){13==e.keyCode&&(e.metaKey||e.ctrlKey)&&$("#add-customer-note").click()}),$(document.body).on("click","#edd-disable-debug-log",function(e){e.preventDefault(),$(this).attr("disabled",!0);var notice=$("#edd-debug-log-notice");$.ajax({type:"GET",data:{action:"edd\_disable\_debugging",nonce:$("#edd\_debug\_log\_delete").val()},url:ajaxurl,success:function(response){notice.empty().append(response.data),setTimeout(function(){notice.slideUp()},3e3)}}).fail(function(response){notice.empty().append(response.responseJSON.data)})})});var eddFormatCurrency=function(decimalPlaces){var numeric=parseFloat(decimalPlaces),storeCurrency=edd\_vars.currency,decimalPlaces=edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"currency",currency:storeCurrency,minimumFractionDigits:decimalPlaces,maximumFractionDigits:decimalPlaces})},eddFormatNumber=function(storeCurrency){var numeric=parseFloat(storeCurrency),storeCurrency=edd\_vars.currency;edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(label,series){return'<div style="font-size:12px; text-align:center; padding:2px">'+label+"</div>"},eddLegendFormatterSales=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatNumber(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item},eddLegendFormatterEarnings=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatCurrency(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item};function edd\_attach\_tooltips(selector){selector.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function easy\_digital\_downloads\_recapture\_remote\_install(){jQuery.post(ajaxurl,{action:"edd\_recapture\_remote\_install"},function(response){0==response.success&&confirm(response.data.error)?location.reload():window.location.href="https://recapture.io/register"})}
1
jQuery(document).ready(function($){edd\_attach\_tooltips($(".edd-help-tip"));var EDD\_Download\_Configuration={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone\_repeatable:function(row){var key;highest=1;return row.parent().find(".edd\_repeatable\_row").each(function(){var current=$(this).data("key");parseInt(current)>highest&&(highest=current)}),key=highest+=1,clone=row.clone(),clone.removeClass("edd\_add\_blank"),clone.attr("data-key",key),clone.find("input, select, textarea").val("").each(function(){var name=$(this).attr("name"),id=$(this).attr("id");name&&(name=name.replace(/\\\[(\\d+)\\\]/,"\["+parseInt(key)+"\]"),$(this).attr("name",name)),$(this).attr("data-key",key),void 0!==id&&(id=id.replace(/(\\d+)/,parseInt(key)),$(this).attr("id",id))}),clone.find("select").each(function(){$(this).val(row.find('select\[name="'+$(this).attr("name")+'"\]').val())}),clone.find('input\[type="checkbox"\]').each(function(){$(this).is(":checked")&&$(this).prop("checked",!1),$(this).val(1)}),clone.find("span.edd\_price\_id").each(function(){$(this).text(parseInt(key))}),clone.find("span.edd\_file\_id").each(function(){$(this).text(parseInt(key))}),clone.find(".edd\_repeatable\_default\_input").each(function(){$(this).val(parseInt(key)).removeAttr("checked")}),clone.find(".edd\_repeatable\_index").each(function(){$(this).val(parseInt(key))}),clone.find(".edd\_repeatable\_condition\_field").each(function(){$(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd\_attach\_tooltips(clone.find(".edd-help-tip")),clone},add:function(){$(document.body).on("click",".submit .edd\_add\_repeatable",function(clone){clone.preventDefault();var row=$(this).parent().parent().prev(".edd\_repeatable\_row"),clone=EDD\_Download\_Configuration.clone\_repeatable(row);clone.insertAfter(row).find("input, textarea, select").filter(":visible").eq(0).focus(),clone.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}),clone.find(".edd-select-chosen").css("width","100%"),clone.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd\_vars.search\_placeholder)})},move:function(){$(".edd\_repeatable\_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd\_repeatable\_row",opacity:.6,cursor:"move",axis:"y",update:function(){var count=0;$(this).find(".edd\_repeatable\_row").each(function(){$(this).find("input.edd\_repeatable\_index").each(function(){$(this).val(count)}),count++})}})},remove:function(){$(document.body).on("click",".edd-remove-row, .edd\_remove\_repeatable",function(firstFocusable){firstFocusable.preventDefault();var row=$(this).parents(".edd\_repeatable\_row"),count=row.parent().find(".edd\_repeatable\_row").length,type=$(this).data("type"),repeatable="div.edd\_repeatable\_"+type+"s",price\_row\_id=$(this).is(".ui-sortable .edd\_repeatable\_row:first-child .edd-remove-row, .ui-sortable .edd\_repeatable\_row:first-child .edd\_remove\_repeatable")?row.next(".edd\_repeatable\_row"):row.prev(".edd\_repeatable\_row"),firstFocusable=price\_row\_id.find("select, input, textarea, button").filter(":visible").eq(0);if("price"===type&&(price\_row\_id=row.data("key"),$('.edd\_repeatable\_condition\_field option\[value="'+price\_row\_id+'"\]').remove()),1<count)$("input, select",row).val(""),row.fadeOut("fast").remove(),firstFocusable.focus();else switch(type){case"price":alert(edd\_vars.one\_price\_min);break;case"file":$("input, select",row).val("");break;default:alert(edd\_vars.one\_field\_min)}$(repeatable).each(function(rowIndex){$(this).find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+rowIndex+"\]");$(this).attr("name",name).attr("id",name)})})})},type:function(){$(document.body).on("change","#\_edd\_product\_type",function(e){var edd\_products=$("#edd\_products"),edd\_download\_files=$("#edd\_download\_files"),edd\_download\_limit\_wrap=$("#edd\_download\_limit\_wrap");"bundle"===$(this).val()?(edd\_products.show(),edd\_download\_files.hide(),edd\_download\_limit\_wrap.hide()):(edd\_products.hide(),edd\_download\_files.show(),edd\_download\_limit\_wrap.show())})},prices:function(){$(document.body).on("change","#edd\_variable\_pricing",function(e){var checked=$(this).is(":checked"),single=$("#edd\_regular\_price\_field"),variable=$("#edd\_variable\_price\_fields, .edd\_repeatable\_table .pricing"),bundleRow=$(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");checked?(single.hide(),variable.show(),bundleRow.addClass("has-variable-pricing")):(single.show(),variable.hide(),bundleRow.removeClass("has-variable-pricing"))})},files:function(){var file\_frame;window.formfield="",$(document.body).on("click",".edd\_upload\_file\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).closest(".edd\_repeatable\_upload\_wrapper"),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader-title"),button:{text:button.data("uploader-button-text")},multiple:"0"!=$(this).data("multiple")})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,clone){var row,selectedSize="image"===(attachment=attachment.toJSON()).type&&$(".attachment-display-settings .size option:selected").val(),selectedURL=attachment.url,selectedName=0<attachment.title.length?attachment.title:attachment.filename;selectedSize&&void 0!==attachment.sizes\[selectedSize\]&&(selectedURL=attachment.sizes\[selectedSize\].url),"image"===attachment.type&&(selectedName=selectedSize&&void 0!==attachment.sizes\[selectedSize\]?selectedName+"-"+attachment.sizes\[selectedSize\].width+"x"+attachment.sizes\[selectedSize\].height:selectedName+"-"+attachment.width+"x"+attachment.height),0===clone?(window.formfield.find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),window.formfield.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),window.formfield.find(".edd\_repeatable\_upload\_field").val(selectedURL),window.formfield.find(".edd\_repeatable\_name\_field").val(selectedName)):(row=window.formfield,(clone=EDD\_Download\_Configuration.clone\_repeatable(row)).find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),clone.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),clone.find(".edd\_repeatable\_upload\_field").val(selectedURL),clone.find(".edd\_repeatable\_name\_field").val(selectedName),clone.insertAfter(row))})})),file\_frame.open()}),window.formfield=""},updatePrices:function(){$("#edd\_price\_fields").on("keyup",".edd\_variable\_prices\_name",function(){var key=$(this).parents(".edd\_repeatable\_row").data("key"),name=$(this).val(),field\_option=$(".edd\_repeatable\_condition\_field option\[value="+key+"\]");0<field\_option.length?field\_option.text(name):$(".edd\_repeatable\_condition\_field").append($("<option></option>").attr("value",key).text(name))})}};$(document.body).on("click",".toggle-custom-price-option-section",function(header){header.preventDefault();var show=$(this).html()==edd\_vars.show\_advanced\_settings;show?$(this).html(edd\_vars.hide\_advanced\_settings):$(this).html(edd\_vars.show\_advanced\_settings);header=$(this).parents(".edd-repeatable-row-header");header.siblings(".edd-custom-price-option-sections-wrap").slideToggle(),$(":input:not(input\[type=button\],input\[type=submit\],button):visible:first",show?header.siblings(".edd-custom-price-option-sections-wrap"):header.siblings(".edd-repeatable-row-standard-fields")).focus()}),EDD\_Download\_Configuration.init();var typingTimer,edd\_datepicker=$(".edd\_datepicker");0<edd\_datepicker.length&&edd\_datepicker.datepicker({dateFormat:"mm/dd/yy"}),{init:function(){this.edit\_address(),this.remove\_download(),this.add\_download(),this.change\_customer(),this.new\_customer(),this.edit\_price(),this.recalculate\_total(),this.variable\_prices\_check(),this.add\_note(),this.remove\_note(),this.resend\_receipt(),this.copy\_download\_link()},edit\_address:function(){$('select\[name="edd-payment-address\[0\]\[country\]"\]').change(function(){var data=$(this),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd-payment-address\[0\]\[state\]"};return $.post(ajaxurl,data,function(response){var state\_wrapper=$("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");$("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==response?state\_wrapper.replaceWith('<input type="text" name="edd-payment-address\[0\]\[state\]" value="" class="edd-edit-toggles medium-text"/>'):state\_wrapper.replaceWith(response)}),!1})},remove\_download:function(){$("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var key,download\_id,price\_id,quantity,amount,fees,currently\_removed;return 1===$(document.body).find("#edd-purchased-files > .row:not(.header)").length?alert(edd\_vars.one\_download\_min):confirm(edd\_vars.delete\_payment\_download)&&(key=$(this).data("key"),$(".edd-payment-id").val(),download\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[id\]"\]').val(),price\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[price\_id\]"\]').val(),quantity=$('input\[name="edd-payment-details-downloads\['+key+'\]\[quantity\]"\]').val(),amount=$('input\[name="edd-payment-details-downloads\['+key+'\]\[amount\]"\]').val(),$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').length&&(fees=$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').val()),$('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').length&&(fees=$.parseJSON($('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').val())),currently\_removed=$('input\[name="edd-payment-removed"\]').val(),(currently\_removed=(currently\_removed=$.parseJSON(currently\_removed)).length<1?{}:currently\_removed)\[key\]=\[{id:download\_id,price\_id:price\_id,quantity:quantity,amount:amount,cart\_index:key}\],$('input\[name="edd-payment-removed"\]').val(JSON.stringify(currently\_removed)),$(this).parent().parent().remove(),fees&&fees.length&&$.each(fees,function(key,value){$('\*li\[data-fee-id="'+value+'"\]').remove()}),$("#edd-payment-downloads-changed").val(1),$(".edd-order-payment-recalc-totals").show()),!1})},change\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(cancel){cancel.preventDefault();var change\_customer=$(this).hasClass("edd-payment-change-customer"),cancel=$(this).hasClass("edd-payment-change-customer-cancel");change\_customer?($(".customer-info").hide(),$(".change-customer").show(),$(".edd-payment-change-customer-input").css("width","auto")):cancel&&($(".customer-info").show(),$(".change-customer").hide())})},new\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(cancel){cancel.preventDefault();var new\_customer=$(this).hasClass("edd-payment-new-customer"),cancel=$(this).hasClass("edd-payment-new-customer-cancel");new\_customer?($(".customer-info").hide(),$(".new-customer").show()):cancel&&($(".customer-info").show(),$(".new-customer").hide());new\_customer=$("#edd-new-customer");$(".new-customer").is(":visible")?new\_customer.val(1):new\_customer.val(0)})},add\_download:function(){$(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(download\_title){download\_title.preventDefault();var quantity=$("#edd\_order\_download\_select"),item\_price=$("#edd-order-download-quantity"),item\_total=$("#edd-order-download-price"),price\_id=$("#edd-order-download-tax"),clone=$(".edd\_price\_options\_select option:selected"),download\_id=quantity.val(),download\_title=quantity.find(":selected").text(),quantity=item\_price.val(),item\_price=item\_total.val(),item\_total=price\_id.val(),price\_id=clone.val(),clone=clone.text();if(download\_id<1)return!1;if(item\_price=item\_price||0,item\_price=parseFloat(item\_price),isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;if(item\_total=parseFloat(item\_total),isNaN(item\_total))return alert(edd\_vars.numeric\_item\_tax),!1;if(isNaN(parseInt(quantity)))return alert(edd\_vars.numeric\_quantity),!1;clone&&(download\_title=download\_title+" - "+clone);var count=$("#edd-purchased-files div.row:not(.edd-purchased-files-header)").length;0==count&&alert(edd\_vars.no\_downloads\_error);clone=$("#edd-purchased-files div.row:not(.edd-purchased-files-header):last").clone();clone.find(".download span").html('<a href="post.php?post='+download\_id+'&action=edit"></a>'),clone.find(".download span a").text(download\_title),clone.find(".edd-payment-details-download-item-price").val(item\_price.toFixed(edd\_vars.currency\_decimals)),clone.find(".edd-payment-details-download-item-tax").val(item\_total.toFixed(edd\_vars.currency\_decimals)),clone.find("input.edd-payment-details-download-id").val(download\_id),clone.find("input.edd-payment-details-download-price-id").val(price\_id);item\_total=(item\_total=item\_price\*quantity+item\_total).toFixed(edd\_vars.currency\_decimals);clone.find("span.edd-payment-details-download-amount").text(item\_total),clone.find("input.edd-payment-details-download-amount").val(item\_total),clone.find("input.edd-payment-details-download-quantity").val(quantity),clone.find("input.edd-payment-details-download-has-log").val(0),clone.find(".edd-copy-download-link-wrapper").remove(),clone.find("input").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("a.edd-order-remove-download").attr("data-key",parseInt(count)),$("#edd-payment-downloads-changed").val(1),$("#edd-purchased-files div.row .edd-purchased-download-title .deleted").length&&$("#edd-purchased-files div.row:last").remove(),$(clone).insertAfter("#edd-purchased-files div.row:last"),$(".edd-order-payment-recalc-totals").show(),$(".edd-add-download-field").val("")})},edit\_price:function(){$(document.body).on("change keyup",".edd-payment-item-input",function(){var row=$(this).parents("ul.edd-purchased-files-list-wrapper");$(".edd-order-payment-recalc-totals").show();var quantity=row.find("input.edd-payment-details-download-quantity").val().replace(edd\_vars.thousands\_separator,""),item\_price=row.find("input.edd-payment-details-download-item-price").val().replace(edd\_vars.thousands\_separator,""),item\_total=row.find("input.edd-payment-details-download-item-tax").val().replace(edd\_vars.thousands\_separator,""),item\_price=parseFloat(item\_price);if(isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;item\_total=parseFloat(item\_total),isNaN(item\_total)&&(item\_total=0);item\_total=(item\_total=item\_price\*(quantity=isNaN(parseInt(quantity))?1:quantity)+item\_total).toFixed(edd\_vars.currency\_decimals);row.find("input.edd-payment-details-download-amount").val(item\_total),row.find("span.edd-payment-details-download-amount").text(item\_total)})},recalculate\_total:function(){$("#edd-order-recalc-total").on("click",function(taxes){taxes.preventDefault();var total=0,tax=0,totals=$("#edd-purchased-files .row input.edd-payment-details-download-amount"),taxes=$("#edd-purchased-files .row input.edd-payment-details-download-item-tax");totals.length&&totals.each(function(){total+=parseFloat($(this).val())}),taxes.length&&taxes.each(function(){tax+=parseFloat($(this).val())}),$(".edd-payment-fees").length&&$(".edd-payment-fees span.fee-amount").each(function(){total+=parseFloat($(this).data("fee"))}),$("input\[name=edd-payment-total\]").val(total.toFixed(edd\_vars.currency\_decimals)),$("input\[name=edd-payment-tax\]").val(tax.toFixed(edd\_vars.currency\_decimals))})},variable\_prices\_check:function(){$(".edd-edit-purchase-element").on("change","select#edd\_order\_download\_select",function(){var $this=$(this),download\_id=$this.val();0<parseInt(download\_id)&&$.ajax({type:"POST",data:{action:"edd\_check\_for\_download\_price\_variations",download\_id:download\_id},url:ajaxurl,success:function(response){$(".edd\_price\_options\_select").remove(),$(response).insertAfter($this.next())}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})},add\_note:function(){$("#edd-add-payment-note").on("click",function(postData){postData.preventDefault();var border\_color,postData={action:"edd\_insert\_payment\_note",payment\_id:$(this).data("payment-id"),nonce:$(this).data("nonce"),note:$("#edd-payment-note").val()};postData.note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-payment-notes-inner").append(response),$(".edd-no-payment-notes").hide(),$("#edd-payment-note").val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=$("#edd-payment-note").css("border-color"),$("#edd-payment-note").css("border-color","red"),setTimeout(function(){$("#edd-payment-note").css("border-color",border\_color)},500))})},remove\_note:function(){$(document.body).on("click",".edd-delete-payment-note",function(e){if(e.preventDefault(),confirm(edd\_vars.delete\_payment\_note)){var postData={action:"edd\_delete\_payment\_note",payment\_id:$(this).data("payment-id"),note\_id:$(this).data("note-id")};return $.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){return $("#edd-payment-note-"+postData.note\_id).remove(),$(".edd-payment-note").length||$(".edd-no-payment-notes").show(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!0}})},resend\_receipt:function(){var emails\_wrap=$(".edd-order-resend-receipt-addresses");$(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),emails\_wrap.slideDown()}),$(document.body).on("change",".edd-order-resend-receipt-email",function(){var href=$("#edd-select-receipt-email").prop("href")+"&email="+$(this).val();confirm(edd\_vars.resend\_receipt)&&(window.location=href)}),$(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd\_vars.resend\_receipt)})},copy\_download\_link:function(){$(document.body).on("click",".edd-copy-download-link",function(postData){postData.preventDefault();postData=$(this),postData={action:"edd\_get\_file\_download\_link",payment\_id:$('input\[name="edd\_payment\_id"\]').val(),download\_id:postData.data("download-id"),price\_id:postData.data("price-id")};$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(link){return $("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+link+"</textarea>"),$("#edd-download-link-textarea").focus().select(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})}}.init(),{init:function(){this.type\_select(),this.product\_requirements()},type\_select:function(){$("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var val=$(this).val();$(".edd-amount-description").hide(),$(".edd-amount-description."+val+"-discount").show()})},product\_requirements:function(){$("#products").change(function(){var product\_conditions=$("#edd-discount-product-conditions");$(this).val()?product\_conditions.show():product\_conditions.hide()})}}.init(),{init:function(){this.date\_options(),this.customers\_export()},date\_options:function(){$("#edd-graphs-date-options").change(function(){var $this=$(this),date\_range\_options=$("#edd-date-range-options");"other"===$this.val()?date\_range\_options.show():date\_range\_options.hide()})},customers\_export:function(){$("#edd\_customer\_export\_download").change(function(){var price\_options\_select,$this=$(this),data=$("option:selected",$this).val(),customer\_export\_option=$("#edd\_customer\_export\_option");"0"===$this.val()?customer\_export\_option.show():customer\_export\_option.hide(),0!=parseInt(data)?(data={action:"edd\_check\_for\_download\_price\_variations",download\_id:data,all\_prices:!0},price\_options\_select=$(".edd\_price\_options\_select"),$.post(ajaxurl,data,function(response){price\_options\_select.remove(),$("#edd\_customer\_export\_download\_chosen").after(response)})):price\_options\_select.remove()})}}.init(),{init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var file\_frame,edd\_settings\_upload\_button=$(".edd-color-picker");edd\_settings\_upload\_button.length&&edd\_settings\_upload\_button.wpColorPicker(),"undefined"==typeof wp||"1"!==edd\_vars.new\_media\_ui?0<(edd\_settings\_upload\_button=$(".edd\_settings\_upload\_button")).length&&(window.formfield="",$(document.body).on("click",edd\_settings\_upload\_button,function(e){e.preventDefault(),window.formfield=$(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(html){window.formfield?(imgurl=$("a","<div>"+html+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe\_interval),tb\_remove()):window.edd\_send\_to\_editor(html),window.send\_to\_editor=window.edd\_send\_to\_editor,window.formfield="",window.imagefield=!1}):(window.formfield="",$(document.body).on("click",".edd\_settings\_upload\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).parent().prev(),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader\_title"),button:{text:button.data("uploader\_button\_text")},multiple:!1})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,index){attachment=attachment.toJSON(),window.formfield.val(attachment.url)})})),file\_frame.open()}),window.formfield="")},taxes:function(){var no\_states=$("select.edd-no-states");no\_states.length&&no\_states.closest("tr").addClass("hidden"),$('select\[name="edd\_settings\[base\_country\]"\]').change(function(){var data=$(this),$tr=data.closest("tr"),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd\_settings\[base\_state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?$tr.next().addClass("hidden"):($tr.next().removeClass("hidden"),$tr.next().find("select").replaceWith(response))}),!1}),$(document.body).on("change","#edd\_tax\_rates select.edd-tax-country",function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:$this.attr("name").replace("country","state")};return $.post(ajaxurl,data,function(response){var text\_field;"nostates"==response?(text\_field='<input type="text" name="'+data.field\_name+'" value=""/>',$this.parent().next().find("select").replaceWith(text\_field)):($this.parent().next().find("input,select").show(),$this.parent().next().find("input,select").replaceWith(response))}),!1}),$("#edd\_add\_tax\_rate").on("click",function(){var row=$("#edd\_tax\_rates tr:last"),clone=row.clone(),count=row.parent().find("tr").length;return clone.find("td input").not(":input\[type=checkbox\]").val(""),clone.find('td \[type="checkbox"\]').attr("checked",!1),clone.find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("label").each(function(){var name=(name=$(this).attr("for")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("for",name)}),clone.insertAfter(row),!1}),$(document.body).on("click","#edd\_tax\_rates .edd\_remove\_tax\_rate",function(){return confirm(edd\_vars.delete\_tax\_rate)&&(2===$("#edd\_tax\_rates tr:visible").length?($("#edd\_tax\_rates select").val(""),$('#edd\_tax\_rates input\[type="text"\]').val(""),$('#edd\_tax\_rates input\[type="number"\]').val(""),$('#edd\_tax\_rates input\[type="checkbox"\]').attr("checked",!1)):$(this).closest("tr").remove(),$("#edd\_tax\_rates tr").each(function(rowIndex){$(this).children().find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+(rowIndex-1)+"\]");$(this).attr("name",name).attr("id",name)})})),!1})},emails:function(){$("#edd-recapture-connect").on("click",function(e){e.preventDefault(),$(this).html(edd\_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy\_digital\_downloads\_recapture\_remote\_install()})},misc:function(){var downloadMethod=$('select\[name="edd\_settings\[download\_method\]"\]'),symlink=downloadMethod.parent().parent().next();"direct"==downloadMethod.val()&&(symlink.hide(),symlink.find("input").prop("checked",!1)),downloadMethod.on("change",function(){"direct"==$(this).val()?(symlink.hide(),symlink.find("input").prop("checked",!1)):symlink.show()})}}.init(),$(".download\_page\_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return!!confirm(edd\_vars.delete\_payment)}),$("body").on("click","#the-list .editinline",function(){var post\_id=(post\_id=$(this).closest("tr").attr("id")).replace("post-",""),regprice=$("#post-"+post\_id).find(".column-price .downloadprice-"+post\_id).val();regprice!=$("#post-"+post\_id+".column-price .downloadprice-"+post\_id).val()?$(".regprice","#edd-download-data").val(regprice).attr("disabled",!1):$(".regprice","#edd-download-data").val(edd\_vars.quick\_edit\_warning).attr("disabled","disabled")}),$(document.body).on("click","#bulk\_edit",function(){var $price=$("#bulk-edit"),$post\_ids=new Array;$price.find("#bulk-titles").children().each(function(){$post\_ids.push($(this).attr("id").replace(/^(ttle)/i,""))});$price=$('#edd-download-data input\[name="\_edd\_regprice"\]').val();$.post(ajaxurl,{action:"edd\_save\_bulk\_edit",edd\_bulk\_nonce:$post\_ids,post\_ids:$post\_ids,price:$price})}),$(".edd-select-chosen").chosen({inherit\_select\_classes:!0,placeholder\_text\_single:edd\_vars.one\_option,placeholder\_text\_multiple:edd\_vars.one\_or\_more\_option}),$(".edd-select-chosen .chosen-search input").each(function(){var placeholder=$(this).parent().parent().parent().prev("select.edd-select-chosen"),placeholder=(placeholder.data("search-type"),placeholder.data("search-placeholder"));$(this).attr("placeholder",placeholder)}),$(".chosen-choices").on("click",function(){var placeholder=$(this).parent().prev().data("search-placeholder");void 0===placeholder&&(placeholder=edd\_vars.type\_to\_search),$(this).children("li").children("input").attr("placeholder",placeholder)});$(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(lastKey){var val=$(this).val(),container=$(this).closest(".edd-select-chosen"),select=(container.attr("id").replace("\_chosen",""),container.prev()),no\_bundles=container.hasClass("no-bundles"),variations=container.hasClass("variations"),lastKey=lastKey.which,search\_type="edd\_download\_search";if(container.prev().data("search-type")){if("no\_ajax"==select.data("search-type"))return;search\_type="edd\_"+select.data("search-type")+"\_search"}val.length<=3&&"edd\_download\_search"==search\_type||16==lastKey||13==lastKey||91==lastKey||17==lastKey||37==lastKey||38==lastKey||39==lastKey||40==lastKey||(clearTimeout(typingTimer),typingTimer=setTimeout(function(){$.ajax({type:"GET",url:ajaxurl,data:{action:search\_type,s:val,no\_bundles:no\_bundles,variations:variations},dataType:"json",beforeSend:function(){select.closest("ul.chosen-results").empty()},success:function(data){$("option:not(:selected)",select).remove(),$.each(data,function(key,item){$('option\[value="'+item.id+'"\]',select).length||select.prepend('<option value="'+item.id+'">'+item.name+"</option>")}),$(".edd-select-chosen").trigger("chosen:updated"),select.next().find("input").val(val)}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){})},342))}),$("#post").on("click",".edd-thickbox",function(){$(".edd-select-chosen","#choose-download").css("width","100%")}),{init:function(){this.revoke\_api\_key(),this.regenerate\_api\_key(),this.create\_api\_key(),this.recount\_stats()},revoke\_api\_key:function(){$(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd\_vars.revoke\_api\_key)})},regenerate\_api\_key:function(){$(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd\_vars.regenerate\_api\_key)})},create\_api\_key:function(){$(document.body).on("submit","#api-key-generate-form",function(e){var input=$('input\[type="text"\]\[name="user\_id"\]');input.css("border-color","#ddd");var user\_id=input.val();if(user\_id.length<1||0==user\_id)return input.css("border-color","#ff0000"),!1})},recount\_stats:function(){$(document.body).on("change","#recount-stats-type",function(){var export\_form=$("#edd-tools-recount-form"),selected\_type=$("option:selected",this).data("type"),submit\_button=$("#recount-stats-submit"),products=$("#tools-product-dropdown");export\_form.find(".notice-wrap").remove(),submit\_button.removeClass("button-disabled").attr("disabled",!1),products.hide(),$(".edd-recount-stats-descriptions span").hide(),"recount-download"===selected\_type?(products.show(),products.find(".edd-select-chosen").css("width","auto")):"reset-stats"===selected\_type?(export\_form.append('<div class="notice-wrap"></div>'),export\_form.find(".notice-wrap").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>"),$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")):(products.hide(),products.val(0)),$("#"+selected\_type).show()}),$(document.body).on("change","#confirm-reset",function(){$(this).is(":checked")?$("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),$("#edd-tools-recount-form").submit(function(e){var selection=$("#recount-stats-type").val(),export\_form=$(this),selected\_type=$("option:selected",this).data("type");if("reset-stats"===selected\_type){if($("#confirm-reset").is(":checked"))return!0;has\_errors=!0}export\_form.find(".notice-wrap").remove(),export\_form.append('<div class="notice-wrap"></div>');var notice\_wrap=export\_form.find(".notice-wrap"),has\_errors=!1;if(null!==selection&&0!==selection||(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_class+"</p></div>"),has\_errors=!0),"recount-download"===selected\_type&&0==$('select\[name="download\_id"\]').val()&&(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_reqs+"</p></div>"),has\_errors=!0),has\_errors)return export\_form.find(".button-disabled").removeClass("button-disabled"),!1})}}.init(),{init:function(){this.submit(),this.dismiss\_message()},submit:function(){var self=this;$(document.body).on("submit",".edd-export-form",function(data){data.preventDefault();var submitButton=$(this).find('input\[type="submit"\]');submitButton.hasClass("button-disabled")||(data=$(this).serialize(),submitButton.addClass("button-disabled"),$(this).find(".notice-wrap").remove(),$(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),self.process\_step(1,data,self))})},process\_step:function(step,data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:data,action:"edd\_do\_ajax\_export",step:step},dataType:"json",success:function(response){var export\_form,notice\_wrap,success\_message;"done"==response.step||response.error||response.success?(notice\_wrap=(export\_form=$(".edd-export-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),export\_form.find(".button-disabled").removeClass("button-disabled"),response.error?(success\_message=response.message,notice\_wrap.html('<div class="updated error"><p>'+success\_message+"</p></div>")):response.success?(success\_message=response.message,notice\_wrap.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+success\_message+'<span class="notice-dismiss"></span></p></div>')):(notice\_wrap.remove(),window.location=response.url)):($(".edd-progress div").animate({width:response.percentage+"%"},50,function(){}),self.process\_step(parseInt(response.step),data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})},dismiss\_message:function(){$(document.body).on("click","#edd-batch-success .notice-dismiss",function(){$("#edd-batch-success").parent().slideUp("fast")})}}.init();var EDD\_Import={init:function(){this.submit()},submit:function(){$(".edd-import-form").ajaxForm({beforeSubmit:this.before\_submit,success:this.success,complete:this.complete,dataType:"json",error:this.error})},before\_submit:function(arr,notice\_wrap,options){if(notice\_wrap.find(".notice-wrap").remove(),notice\_wrap.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 import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");return import\_form.find(".button-disabled").removeClass("button-disabled"),notice\_wrap.html('<div class="update error"><p>'+edd\_vars.unsupported\_browser+"</p></div>"),!1}},success:function(responseText,statusText,xhr,$form){},complete:function(xhr){var $form,select,options,columns,response=jQuery.parseJSON(xhr.responseText);response.success?(($form=$(".edd-import-form .notice-wrap").parent()).find(".edd-import-file-wrap,.notice-wrap").remove(),$form.find(".edd-import-options").slideDown(),(select=$form.find("select.edd-import-csv-column")).parents("tr").first(),options="",columns=response.data.columns.sort(function(a,b){return a<b?-1:b<a?1:0}),$.each(columns,function(key,value){options+='<option value="'+value+'">'+value+"</option>"}),select.append(options),select.on("change",function(){var $key=$(this).val();$key&&0!=response.data.first\_row\[$key\]?$(this).parent().next().html(response.data.first\_row\[$key\]):$(this).parent().next().html("")}),$.each(select,function(){$(this).val($(this).attr("data-field")).change()}),$(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),$form.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),response.data.mapping=$form.serialize(),EDD\_Import.process\_step(1,response.data,self)})):EDD\_Import.error(xhr)},error:function(notice\_wrap){var response=jQuery.parseJSON(notice\_wrap.responseText),import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):notice\_wrap.remove()},process\_step:function(step,import\_data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:import\_data.form,nonce:import\_data.nonce,class:import\_data.class,upload:import\_data.upload,mapping:import\_data.mapping,action:"edd\_do\_ajax\_import",step:step},dataType:"json",success:function(response){var import\_form,notice\_wrap;"done"==response.data.step||response.data.error?(notice\_wrap=(import\_form=$(".edd-import-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):(import\_form.find(".edd-import-options").hide(),$("html, body").animate({scrollTop:import\_form.parent().offset().top},500),notice\_wrap.html('<div class="updated"><p>'+response.data.message+"</p></div>"))):($(".edd-progress div").animate({width:response.data.percentage+"%"},50,function(){}),EDD\_Import.process\_step(parseInt(response.data.step),import\_data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})}};EDD\_Import.init();var EDD\_Customer={vars:{customer\_card\_wrap\_editable:$(".edd-customer-card-wrapper .editable"),customer\_card\_wrap\_edit\_item:$(".edd-customer-card-wrapper .edit-item"),user\_id:$('input\[name="customerinfo\[user\_id\]"\]'),state\_input:$(':input\[name="customerinfo\[state\]"\]'),note:$("#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(){$(document.body).on("click","#edit-customer",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_editable.hide(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.fadeIn().css("display","block")})},add\_email:function(){$(document.body).on("click","#add-customer-email",function(nonce){nonce.preventDefault();var button=$(this),wrapper=button.parent();wrapper.parent().find(".notice-container").remove(),wrapper.find(".spinner").css("visibility","visible"),button.attr("disabled",!0);var customer\_id=wrapper.find('input\[name="customer-id"\]').val(),email=wrapper.find('input\[name="additional-email"\]').val(),primary=wrapper.find('input\[name="make-additional-primary"\]').is(":checked"),nonce=wrapper.find('input\[name="add\_email\_nonce"\]').val();$.post(ajaxurl,{edd\_action:"customer-add-email",customer\_id:customer\_id,email:email,primary:primary,\_wpnonce:nonce},function(response){!0===response.success?window.location.href=response.redirect:(button.attr("disabled",!1),wrapper.after('<div class="notice-container"><div class="notice notice-error inline"><p>'+response.message+"</p></div></div>"),wrapper.find(".spinner").css("visibility","hidden"))},"json")})},user\_search:function(){$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results a",function(user\_id){user\_id.preventDefault();user\_id=$(this).data("userid");EDD\_Customer.vars.user\_id.val(user\_id)})},remove\_user:function(){$(document.body).on("click","#disconnect-customer",function(postData){postData.preventDefault(),confirm(edd\_vars.disconnect\_customer)&&(postData={edd\_action:"disconnect-userid",customer\_id:$('input\[name="customerinfo\[id\]"\]').val(),\_wpnonce:$("#edit-customer-info #\_wpnonce").val()},$.post(ajaxurl,postData,function(response){window.location.href=window.location.href},"json"))})},cancel\_edit:function(){$(document.body).on("click","#edd-edit-customer-cancel",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.hide(),EDD\_Customer.vars.customer\_card\_wrap\_editable.show(),$(".edd\_user\_search\_results").html("")})},change\_country:function(){$('select\[name="customerinfo\[country\]"\]').change(function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:"customerinfo\[state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?EDD\_Customer.vars.state\_input.replaceWith('<input type="text" name="'+data.field\_name+'" value="" class="edd-edit-toggles medium-text"/>'):EDD\_Customer.vars.state\_input.replaceWith(response)}),!1})},add\_note:function(){$(document.body).on("click","#add-customer-note",function(postData){postData.preventDefault();var border\_color,postData={edd\_action:"add-customer-note",customer\_id:$("#customer-id").val(),customer\_note:EDD\_Customer.vars.note.val(),add\_customer\_note\_nonce:$("#add\_customer\_note\_nonce").val()};postData.customer\_note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-customer-notes").prepend(response),$(".edd-no-customer-notes").hide(),EDD\_Customer.vars.note.val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=EDD\_Customer.vars.note.css("border-color"),EDD\_Customer.vars.note.css("border-color","red"),setTimeout(function(){EDD\_Customer.vars.note.css("border-color",border\_color)},500))})},delete\_checked:function(){$("#edd-customer-delete-confirm").change(function(){var records\_input=$("#edd-customer-delete-records"),submit\_button=$("#edd-delete-customer");$(this).prop("checked")?(records\_input.attr("disabled",!1),submit\_button.attr("disabled",!1)):(records\_input.attr("disabled",!0),records\_input.prop("checked",!1),submit\_button.attr("disabled",!0))})}};EDD\_Customer.init();var EDD\_Promo\_Notices={init:function(){EDD\_Promo\_Notices.displayNotices(),EDD\_Promo\_Notices.dismissNotices()},displayNotices:function(){var topOfPageNoticeEl,topOfPageNotice=$(".edd-admin-notice-top-of-page");topOfPageNotice&&(topOfPageNoticeEl=topOfPageNotice.detach(),$("#wpbody-content").prepend(topOfPageNoticeEl),topOfPageNotice.delay(1e3).slideDown())},dismissNotices:function(){$(".edd-promo-notice").each(function(){var notice=$(this);notice.on("click",".edd-promo-notice-dismiss",function(e){$(this).attr("href")||e.preventDefault(),$.ajax({type:"POST",data:{action:"edd\_dismiss\_promo\_notice",notice\_id:notice.data("id"),nonce:notice.data("nonce"),lifespan:notice.data("lifespan")},url:ajaxurl,success:function(response){notice.slideUp()}})})})}};EDD\_Promo\_Notices.init(),$(".edd-ajax-user-search").keyup(function(){var user\_search=$(this).val(),data="";$(this).data("exclude")&&(data=$(this).data("exclude")),$(".edd-ajax").show();data={action:"edd\_search\_users",user\_name:user\_search,exclude:data};document.body.style.cursor="wait",$.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(search\_response){$(".edd-ajax").hide(),$(".edd\_user\_search\_results").removeClass("hidden"),$(".edd\_user\_search\_results span").html(""),$(search\_response.results).appendTo(".edd\_user\_search\_results span"),document.body.style.cursor="default"}})}),$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results span a",function(login){login.preventDefault();login=$(this).data("login");$(".edd-ajax-user-search").val(login),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$(document.body).on("click.eddCancelUserSearch",".edd\_user\_search\_results a.edd-ajax-user-cancel",function(e){e.preventDefault(),$(".edd-ajax-user-search").val(""),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$("#edd\_dashboard\_sales").length&&$.ajax({type:"GET",data:{action:"edd\_load\_dashboard\_widget"},url:ajaxurl,success:function(response){$("#edd\_dashboard\_sales .edd-loading").html(response)}}),$(document.body).on("keydown",".customer-note-input",function(e){13==e.keyCode&&(e.metaKey||e.ctrlKey)&&$("#add-customer-note").click()}),$(document.body).on("click","#edd-disable-debug-log",function(e){e.preventDefault(),$(this).attr("disabled",!0);var notice=$("#edd-debug-log-notice");$.ajax({type:"GET",data:{action:"edd\_disable\_debugging",nonce:$("#edd\_debug\_log\_delete").val()},url:ajaxurl,success:function(response){notice.empty().append(response.data),setTimeout(function(){notice.slideUp()},3e3)}}).fail(function(response){notice.empty().append(response.responseJSON.data)})})});var eddFormatCurrency=function(decimalPlaces){var numeric=parseFloat(decimalPlaces),storeCurrency=edd\_vars.currency,decimalPlaces=edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"currency",currency:storeCurrency,minimumFractionDigits:decimalPlaces,maximumFractionDigits:decimalPlaces})},eddFormatNumber=function(storeCurrency){var numeric=parseFloat(storeCurrency),storeCurrency=edd\_vars.currency;edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(label,series){return'<div style="font-size:12px; text-align:center; padding:2px">'+label+"</div>"},eddLegendFormatterSales=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatNumber(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item},eddLegendFormatterEarnings=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatCurrency(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item};function edd\_attach\_tooltips(selector){selector.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function easy\_digital\_downloads\_recapture\_remote\_install(){jQuery.post(ajaxurl,{action:"edd\_recapture\_remote\_install"},function(response){0==response.success&&confirm(response.data.error)?location.reload():window.location.href="https://recapture.io/register"})}
easy-digital-downloads/tags/2.11.6/assets/js/paypal-checkout.js
r2622712
r2697388
163
163
var nonces = responseData.data.nonces;
164
164
Object.keys( nonces ).forEach( function ( key ) {
165
document.getElementById( 'edd-gateway-' + key ).setAttribute( 'data-' + key + '-nonce', nonces\[ key \] );
165
var gatewaySelector = document.getElementById( 'edd-gateway-' + key );
166
if ( gatewaySelector ) {
167
gatewaySelector.setAttribute( 'data-' + key + '-nonce', nonces\[ key \] );
168
}
166
169
} );
167
170
}
easy-digital-downloads/tags/2.11.6/assets/js/paypal-checkout.min.js
r2622712
r2697388
1
var EDD\_PayPal={isMounted:!1,init:function(){document.getElementById("edd-paypal-container")&&this.initButtons("#edd-paypal-container","checkout"),jQuery(document.body).on("edd\_discount\_applied",this.maybeRefreshPage),jQuery(document.body).on("edd\_discount\_removed",this.maybeRefreshPage)},isPayPal:function(){var chosenGateway=!1;return"paypal\_commerce"===(chosenGateway=!(chosenGateway=jQuery("select#edd-gateway, input.edd-gateway").length?jQuery("meta\[name='edd-chosen-gateway'\]").attr("content"):chosenGateway)&&edd\_scripts.default\_gateway?edd\_scripts.default\_gateway:chosenGateway)},maybeRefreshPage:function(e,data){(0===data.total\_plain&&EDD\_PayPal.isPayPal()||!EDD\_PayPal.isMounted&&EDD\_PayPal.isPayPal()&&0<data.total\_plain)&&window.location.reload()},setErrorHtml:function(form,context,errorHtml){var errorWrapper;"checkout"===context&&"undefined"!=typeof edd\_global\_vars&&edd\_global\_vars.checkout\_error\_anchor?(errorWrapper=document.getElementById("edd-paypal-errors-wrap"))&&(errorWrapper.innerHTML=errorHtml):"buy\_now"!==context||(errorWrapper=!!(form=form.closest(".edd\_download\_purchase\_form"))&&form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"))&&(errorWrapper.innerHTML=errorHtml),jQuery(document.body).trigger("edd\_checkout\_error",\[errorHtml\])},initButtons:function(container,context){EDD\_PayPal.isMounted=!0,paypal.Buttons(EDD\_PayPal.getButtonArgs(container,context)).render(container),document.dispatchEvent(new CustomEvent("edd\_paypal\_buttons\_mounted"))},getButtonArgs:function(container,context){var form="checkout"===context?document.getElementById("edd\_purchase\_form"):container.closest(".edd\_download\_purchase\_form"),errorWrapper="checkout"===context?form.querySelector("#edd-paypal-errors-wrap"):form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"),spinner="checkout"===context?document.getElementById("edd-paypal-spinner"):form.querySelector(".edd-paypal-spinner"),nonceEl=form.querySelector('input\[name="edd\_process\_paypal\_nonce"\]'),tokenEl=form.querySelector('input\[name="edd-process-paypal-token"\]'),createFunc="subscription"===eddPayPalVars.intent?"createSubscription":"createOrder",buttonArgs={onApprove:function(data,actions){var formData=new FormData;return formData.append("action",eddPayPalVars.approvalAction),formData.append("edd\_process\_paypal\_nonce",nonceEl.value),formData.append("token",tokenEl.getAttribute("data-token")),formData.append("timestamp",tokenEl.getAttribute("data-timestamp")),data.orderID&&formData.append("paypal\_order\_id",data.orderID),data.subscriptionID&&formData.append("paypal\_subscription\_id",data.subscriptionID),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){if(responseData.success&&responseData.data.redirect\_url)window.location=responseData.data.redirect\_url;else{spinner.style.display="none";var errorHtml=responseData.data.message||eddPayPalVars.defaultError;if(EDD\_PayPal.setErrorHtml(container,context,errorHtml),responseData.data.retry)return actions.restart()}})},onError:function(error){spinner.style.display="none",error.name="",EDD\_PayPal.setErrorHtml(container,context,error)},onCancel:function(data){spinner.style.display="none";var formData=new FormData;return formData.append("action","edd\_cancel\_paypal\_order"),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){var nonces;responseData.success&&(nonces=responseData.data.nonces,Object.keys(nonces).forEach(function(key){document.getElementById("edd-gateway-"+key).setAttribute("data-"+key+"-nonce",nonces\[key\])}))})}};return eddPayPalVars.style&&(buttonArgs.style=eddPayPalVars.style),buttonArgs\[createFunc\]=function(data,actions){return spinner.style.display="block",errorWrapper&&(errorWrapper.innerHTML=""),fetch(edd\_scripts.ajaxurl,{method:"POST",body:new FormData(form)}).then(function(response){return response.json()}).then(function(orderData){if(orderData.data&&orderData.data.paypal\_order\_id)return orderData.data.nonce&&(nonceEl.value=orderData.data.nonce),orderData.data.token&&(jQuery(tokenEl).attr("data-token",orderData.data.token),jQuery(tokenEl).attr("data-timestamp",orderData.data.timestamp)),orderData.data.paypal\_order\_id;var errorHtml=eddPayPalVars.defaultError;return orderData.data&&"string"==typeof orderData.data?errorHtml=orderData.data:"string"==typeof orderData&&(errorHtml=orderData),new Promise(function(resolve,reject){reject(errorHtml)})})},buttonArgs}};jQuery(document.body).on("edd\_gateway\_loaded",function(e,gateway){"paypal\_commerce"===gateway&&EDD\_PayPal.init()}),jQuery(document).ready(function($){for(var buyButtons=document.querySelectorAll(".edd-paypal-checkout-buy-now"),i=0;i<buyButtons.length;i++){var wrapper,spinnerWrap=buyButtons\[i\];spinnerWrap.classList.contains("edd-free-download")||(wrapper=spinnerWrap.closest(".edd\_purchase\_submit\_wrapper"))&&(wrapper.innerHTML="",(spinnerWrap=document.createElement("div")).classList.add("edd-paypal-checkout-buy-now-error-wrapper"),wrapper.before(spinnerWrap),(spinnerWrap=document.createElement("span")).classList.add("edd-paypal-spinner","edd-loading-ajax","edd-loading"),spinnerWrap.style.display="none",wrapper.after(spinnerWrap),EDD\_PayPal.initButtons(wrapper,"buy\_now"))}});
1
var EDD\_PayPal={isMounted:!1,init:function(){document.getElementById("edd-paypal-container")&&this.initButtons("#edd-paypal-container","checkout"),jQuery(document.body).on("edd\_discount\_applied",this.maybeRefreshPage),jQuery(document.body).on("edd\_discount\_removed",this.maybeRefreshPage)},isPayPal:function(){var chosenGateway=!1;return"paypal\_commerce"===(chosenGateway=!(chosenGateway=jQuery("select#edd-gateway, input.edd-gateway").length?jQuery("meta\[name='edd-chosen-gateway'\]").attr("content"):chosenGateway)&&edd\_scripts.default\_gateway?edd\_scripts.default\_gateway:chosenGateway)},maybeRefreshPage:function(e,data){(0===data.total\_plain&&EDD\_PayPal.isPayPal()||!EDD\_PayPal.isMounted&&EDD\_PayPal.isPayPal()&&0<data.total\_plain)&&window.location.reload()},setErrorHtml:function(form,context,errorHtml){var errorWrapper;"checkout"===context&&"undefined"!=typeof edd\_global\_vars&&edd\_global\_vars.checkout\_error\_anchor?(errorWrapper=document.getElementById("edd-paypal-errors-wrap"))&&(errorWrapper.innerHTML=errorHtml):"buy\_now"!==context||(errorWrapper=!!(form=form.closest(".edd\_download\_purchase\_form"))&&form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"))&&(errorWrapper.innerHTML=errorHtml),jQuery(document.body).trigger("edd\_checkout\_error",\[errorHtml\])},initButtons:function(container,context){EDD\_PayPal.isMounted=!0,paypal.Buttons(EDD\_PayPal.getButtonArgs(container,context)).render(container),document.dispatchEvent(new CustomEvent("edd\_paypal\_buttons\_mounted"))},getButtonArgs:function(container,context){var form="checkout"===context?document.getElementById("edd\_purchase\_form"):container.closest(".edd\_download\_purchase\_form"),errorWrapper="checkout"===context?form.querySelector("#edd-paypal-errors-wrap"):form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"),spinner="checkout"===context?document.getElementById("edd-paypal-spinner"):form.querySelector(".edd-paypal-spinner"),nonceEl=form.querySelector('input\[name="edd\_process\_paypal\_nonce"\]'),tokenEl=form.querySelector('input\[name="edd-process-paypal-token"\]'),createFunc="subscription"===eddPayPalVars.intent?"createSubscription":"createOrder",buttonArgs={onApprove:function(data,actions){var formData=new FormData;return formData.append("action",eddPayPalVars.approvalAction),formData.append("edd\_process\_paypal\_nonce",nonceEl.value),formData.append("token",tokenEl.getAttribute("data-token")),formData.append("timestamp",tokenEl.getAttribute("data-timestamp")),data.orderID&&formData.append("paypal\_order\_id",data.orderID),data.subscriptionID&&formData.append("paypal\_subscription\_id",data.subscriptionID),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){if(responseData.success&&responseData.data.redirect\_url)window.location=responseData.data.redirect\_url;else{spinner.style.display="none";var errorHtml=responseData.data.message||eddPayPalVars.defaultError;if(EDD\_PayPal.setErrorHtml(container,context,errorHtml),responseData.data.retry)return actions.restart()}})},onError:function(error){spinner.style.display="none",error.name="",EDD\_PayPal.setErrorHtml(container,context,error)},onCancel:function(data){spinner.style.display="none";var formData=new FormData;return formData.append("action","edd\_cancel\_paypal\_order"),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){var nonces;responseData.success&&(nonces=responseData.data.nonces,Object.keys(nonces).forEach(function(key){var gatewaySelector=document.getElementById("edd-gateway-"+key);gatewaySelector&&gatewaySelector.setAttribute("data-"+key+"-nonce",nonces\[key\])}))})}};return eddPayPalVars.style&&(buttonArgs.style=eddPayPalVars.style),buttonArgs\[createFunc\]=function(data,actions){return spinner.style.display="block",errorWrapper&&(errorWrapper.innerHTML=""),fetch(edd\_scripts.ajaxurl,{method:"POST",body:new FormData(form)}).then(function(response){return response.json()}).then(function(orderData){if(orderData.data&&orderData.data.paypal\_order\_id)return orderData.data.nonce&&(nonceEl.value=orderData.data.nonce),orderData.data.token&&(jQuery(tokenEl).attr("data-token",orderData.data.token),jQuery(tokenEl).attr("data-timestamp",orderData.data.timestamp)),orderData.data.paypal\_order\_id;var errorHtml=eddPayPalVars.defaultError;return orderData.data&&"string"==typeof orderData.data?errorHtml=orderData.data:"string"==typeof orderData&&(errorHtml=orderData),new Promise(function(resolve,reject){reject(errorHtml)})})},buttonArgs}};jQuery(document.body).on("edd\_gateway\_loaded",function(e,gateway){"paypal\_commerce"===gateway&&EDD\_PayPal.init()}),jQuery(document).ready(function($){for(var buyButtons=document.querySelectorAll(".edd-paypal-checkout-buy-now"),i=0;i<buyButtons.length;i++){var wrapper,spinnerWrap=buyButtons\[i\];spinnerWrap.classList.contains("edd-free-download")||(wrapper=spinnerWrap.closest(".edd\_purchase\_submit\_wrapper"))&&(wrapper.innerHTML="",(spinnerWrap=document.createElement("div")).classList.add("edd-paypal-checkout-buy-now-error-wrapper"),wrapper.before(spinnerWrap),(spinnerWrap=document.createElement("span")).classList.add("edd-paypal-spinner","edd-loading-ajax","edd-loading"),spinnerWrap.style.display="none",wrapper.after(spinnerWrap),EDD\_PayPal.initButtons(wrapper,"buy\_now"))}});
easy-digital-downloads/tags/2.11.6/easy-digital-downloads.php
r2667063
r2697388
6
6
\* Author: Easy Digital Downloads
7
7
\* Author URI: https://easydigitaldownloads.com
8
\* Version: 2.11.5
8
\* Version: 2.11.6
9
9
\* Text Domain: easy-digital-downloads
10
10
\* Domain Path: languages
…
…
26
26
\* @category Core
27
27
\* @author Easy Digital Downloads
28
\* @version 2.11.5
28
\* @version 2.11.6
29
29
\*/
30
30
…
…
232
232
// Plugin version.
233
233
if ( ! defined( 'EDD\_VERSION' ) ) {
234
define( 'EDD\_VERSION', '2.11.5' );
234
define( 'EDD\_VERSION', '2.11.6' );
235
235
}
236
236
easy-digital-downloads/tags/2.11.6/includes/admin/customers/customers.php
r1908451
r2697388
616
616
<input type="hidden" name="edd\_action" value="add-customer-note" />
617
617
<?php wp\_nonce\_field( 'add-customer-note', 'add\_customer\_note\_nonce', true, true ); ?>
618
<input id="add-customer-note" class="right button-primary" type="submit" value="Add Note" />
618
<input id="add-customer-note" class="right button-primary" type="submit" value="<?php esc\_attr\_e( 'Add Note', 'easy-digital-downloads' ); ?>" />
619
619
</form>
620
620
</div>
easy-digital-downloads/tags/2.11.6/includes/admin/extensions/product-education/class-email-marketing.php
r2667063
r2697388
73
73
$configuration\['title'\] = sprintf( \_\_( 'Get %s Today!', 'easy-digital-downloads' ), $product\_data->title );
74
74
}
75
if ( 'mailchimp' === $product\_data->slug && ! ( defined( 'EDD\_MAILCHIMP\_VERSION' ) && version\_compare( EDD\_MAILCHIMP\_VERSION, '3.0.16', '>=' ) ) ) {
76
$configuration\['tab'\] = 'extensions';
77
}
78
75
79
76
return $configuration;
easy-digital-downloads/tags/2.11.6/includes/admin/payments/actions.php
r1906675
r2697388
327
327
328
328
function edd\_ajax\_store\_payment\_note() {
329
$nonce = sanitize\_text\_field( $\_POST\['nonce'\] );
330
if ( ! wp\_verify\_nonce( $nonce, 'edd\_add\_payment\_note' ) ) {
331
wp\_die( \_\_( 'Nonce verification failed', 'easy-digital-downloads' ), \_\_( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
332
}
329
333
330
334
$payment\_id = absint( $\_POST\['payment\_id'\] );
…
…
335
339
}
336
340
337
if( empty( $payment\_id ) )
341
if ( empty( $payment\_id ) ) {
338
342
die( '-1' );
339
340
if( empty( $note ) )
343
}
344
345
if ( empty( $note ) ) {
341
346
die( '-1' );
347
}
342
348
343
349
$note\_id = edd\_insert\_payment\_note( $payment\_id, $note );
easy-digital-downloads/tags/2.11.6/includes/admin/payments/view-order-details.php
r2082925
r2697388
830
830
831
831
<p>
832
<button id="edd-add-payment-note" class="button button-secondary right" data-payment-id="<?php echo absint( $payment\_id ); ?>"\><?php \_e( 'Add Note', 'easy-digital-downloads' ); ?></button>
832
<button id="edd-add-payment-note" class="button button-secondary right" data-payment-id="<?php echo absint( $payment\_id ); ?>" data-nonce="<?php echo wp\_create\_nonce( 'edd\_add\_payment\_note' ); ?>"\><?php \_e( 'Add Note', 'easy-digital-downloads' ); ?></button>
833
833
</p>
834
834
easy-digital-downloads/tags/2.11.6/includes/admin/promos/notices/class-license-upgrade-notice.php
r2649624
r2697388
95
95
$this->pass\_manager->has\_pass() &&
96
96
Pass\_Manager::pass\_compare( $this->pass\_manager->highest\_pass\_id, Pass\_Manager::EXTENDED\_PASS\_ID, '>=' ) &&
97
$this->has\_affiliate\_wp\_license()
97
$this->has\_affiliate\_wp\_license() &&
98
$this->has\_mi\_license()
98
99
) {
99
100
return false;
…
…
119
120
120
121
return (bool) affiliate\_wp()->settings->get( 'license\_key' );
122
}
123
124
/\*\*
125
\* Determines whether or not MonsterInsights is installed and has a license key.
126
\*
127
\* @since 2.11.6
128
\*
129
\* @return bool
130
\*/
131
private function has\_mi\_license() {
132
if ( ! class\_exists( 'MonsterInsights' ) ) {
133
return false;
134
}
135
136
$mi\_license = \\MonsterInsights::$instance->license->get\_license\_key();
137
return ! empty( $mi\_license );
121
138
}
122
139
…
…
149
166
printf(
150
167
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
151
\_\_( 'You are using the free version of Easy Digital Downloads. %1$sPurchase a pass%2$s to get email marketing tools and recurring payments.', 'easy-digital-downloads' ),
168
\_\_( 'You are using the free version of Easy Digital Downloads. %1$sPurchase a pass%2$s to get email marketing tools and recurring payments. %3$sAlready have a Pass?%4$s', 'easy-digital-downloads' ),
152
169
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'core', $source ), 'https://easydigitaldownloads.com/pricing/' ) ) . '" target="\_blank">',
170
'</a>',
171
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'core', $source ), 'https://easydigitaldownloads.com/what-is-an-edd-pass' ) ) . '" target="\_blank">',
153
172
'</a>'
154
173
);
…
…
176
195
} elseif ( Pass\_Manager::pass\_compare( $this->pass\_manager->highest\_pass\_id, Pass\_Manager::EXTENDED\_PASS\_ID, '>=' ) ) {
177
196
197
if ( ! $this->has\_affiliate\_wp\_license() ) {
178
198
// Extended pass or higher.
179
printf(
180
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
181
\_\_( 'Grow your business and make more money with affiliate marketing. %1$sGet AffiliateWP%2$s', 'easy-digital-downloads' ),
182
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'extended-pass', $source ), 'https://affiliatewp.com/?ref=743' ) ) . '" target="\_blank">',
183
'</a>'
184
);
199
printf(
200
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
201
\_\_( 'Grow your business and make more money with affiliate marketing. %1$sGet AffiliateWP%2$s', 'easy-digital-downloads' ),
202
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'extended-pass', $source ), 'https://affiliatewp.com/?ref=743' ) ) . '" target="\_blank">',
203
'</a>'
204
);
205
} elseif( ! $this->has\_mi\_license() ) {
206
printf(
207
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
208
\_\_( 'Gain access to powerful insights to grow your traffic and revenue. %1$sGet MonsterInsights%2$s', 'easy-digital-downloads' ),
209
'<a href="' . esc\_url( 'https://monsterinsights.com?utm\_campaign=xsell&utm\_source=eddplugin&utm\_content=top-promo' ) . '" target="\_blank">',
210
'</a>'
211
);
212
}
185
213
}
186
214
} catch ( \\Exception $e ) {
easy-digital-downloads/tags/2.11.6/includes/admin/reporting/class-file-downloads-logs-list-table.php
r2104403
r2697388
136
136
case 'ip':
137
137
return '<a href="' . esc\_url( 'https://ipinfo.io/' . $item\['ip'\] ) . '" target="\_blank" rel="noopener noreferrer">' . esc\_html( $item\['ip'\] ) . '</a>';
138
case 'file':
139
return esc\_html( $item\['file'\] );
138
140
default:
139
141
return $item\[ $column\_name \];
…
…
380
382
$file\_id = apply\_filters( 'edd\_log\_file\_download\_file\_id', $file\_id, $log );
381
383
382
$file\_name = isset( $files\[ $file\_id \]\['name'\] ) ? $files\[ $file\_id \]\['name'\] : null;
384
$file\_name = ! empty( $files\[ $file\_id \]\['name'\] ) ? $files\[ $file\_id \]\['name'\] : edd\_get\_file\_name( $files\[ $file\_id \] );
383
385
384
386
if ( ( $this->file\_search && strpos( strtolower( $file\_name ), strtolower( $this->get\_search() ) ) !== false ) || ! $this->file\_search ) {
easy-digital-downloads/tags/2.11.6/includes/class-edd-register-meta.php
r2182533
r2697388
518
518
519
519
if( ! empty( $files\[ $id \]\['name'\] ) ) {
520
$files\[ $id \]\['name'\] = trim( $file\['name'\] );
520
$files\[ $id \]\['name'\] = sanitize\_text\_field( $file\['name'\] );
521
521
}
522
522
}
easy-digital-downloads/tags/2.11.6/includes/gateways/paypal-standard.php
r2649624
r2697388
556
556
557
557
// Collect payment details
558
$purchase\_key = isset( $data\['invoice'\] ) ? $data\['invoice'\] : $data\['item\_number'\];
558
$purchase\_key = isset( $data\['invoice'\] ) ? $data\['invoice'\] : false;
559
if ( ! $purchase\_key && ! empty( $data\['item\_number'\] ) ) {
560
$purchase\_key = $data\['item\_number'\];
561
}
559
562
$paypal\_amount = $data\['mc\_gross'\];
560
563
$payment\_status = strtolower( $data\['payment\_status'\] );
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/ClassLoader.php
r2667063
r2697388
38
38
\* @author Fabien Potencier <[email protected]>
39
39
\* @author Jordi Boggiano <[email protected]>
40
\* @see https://www.php-fig.org/psr/psr-0/
41
\* @see https://www.php-fig.org/psr/psr-4/
40
\* @see http://www.php-fig.org/psr/psr-0/
41
\* @see http://www.php-fig.org/psr/psr-4/
42
42
\*/
43
43
class ClassLoader
44
44
{
45
/\*\* @var ?string \*/
46
private $vendorDir;
47
48
45
// PSR-4
49
/\*\*
50
\* @var array\[\]
51
\* @psalm-var array<string, array<string, int>>
52
\*/
53
46
private $prefixLengthsPsr4 = array();
54
/\*\*
55
\* @var array\[\]
56
\* @psalm-var array<string, array<int, string>>
57
\*/
58
47
private $prefixDirsPsr4 = array();
59
/\*\*
60
\* @var array\[\]
61
\* @psalm-var array<string, string>
62
\*/
63
48
private $fallbackDirsPsr4 = array();
64
49
65
50
// PSR-0
66
/\*\*
67
\* @var array\[\]
68
\* @psalm-var array<string, array<string, string\[\]>>
69
\*/
70
51
private $prefixesPsr0 = array();
71
/\*\*
72
\* @var array\[\]
73
\* @psalm-var array<string, string>
74
\*/
75
52
private $fallbackDirsPsr0 = array();
76
53
77
/\*\* @var bool \*/
78
54
private $useIncludePath = false;
79
80
/\*\*
81
\* @var string\[\]
82
\* @psalm-var array<string, string>
83
\*/
84
55
private $classMap = array();
85
86
/\*\* @var bool \*/
87
56
private $classMapAuthoritative = false;
88
89
/\*\*
90
\* @var bool\[\]
91
\* @psalm-var array<string, bool>
92
\*/
93
57
private $missingClasses = array();
94
95
/\*\* @var ?string \*/
96
58
private $apcuPrefix;
97
59
98
/\*\*
99
\* @var self\[\]
100
\*/
101
private static $registeredLoaders = array();
102
103
/\*\*
104
\* @param ?string $vendorDir
105
\*/
106
public function \_\_construct($vendorDir = null)
107
{
108
$this->vendorDir = $vendorDir;
109
}
110
111
/\*\*
112
\* @return string\[\]
113
\*/
114
60
public function getPrefixes()
115
61
{
116
62
if (!empty($this->prefixesPsr0)) {
117
return call\_user\_func\_array('array\_merge', array\_values($this->prefixesPsr0));
63
return call\_user\_func\_array('array\_merge', $this->prefixesPsr0);
118
64
}
119
65
…
…
121
67
}
122
68
123
/\*\*
124
\* @return array\[\]
125
\* @psalm-return array<string, array<int, string>>
126
\*/
127
69
public function getPrefixesPsr4()
128
70
{
…
…
130
72
}
131
73
132
/\*\*
133
\* @return array\[\]
134
\* @psalm-return array<string, string>
135
\*/
136
74
public function getFallbackDirs()
137
75
{
…
…
139
77
}
140
78
141
/\*\*
142
\* @return array\[\]
143
\* @psalm-return array<string, string>
144
\*/
145
79
public function getFallbackDirsPsr4()
146
80
{
…
…
148
82
}
149
83
150
/\*\*
151
\* @return string\[\] Array of classname => path
152
\* @psalm-var array<string, string>
153
\*/
154
84
public function getClassMap()
155
85
{
…
…
158
88
159
89
/\*\*
160
\* @param string\[\] $classMap Class to filename map
161
\* @psalm-param array<string, string> $classMap
162
\*
163
\* @return void
90
\* @param array $classMap Class to filename map
164
91
\*/
165
92
public function addClassMap(array $classMap)
…
…
176
103
\* appending or prepending to the ones previously set for this prefix.
177
104
\*
178
\* @param string $prefix The prefix
179
\* @param string\[\]|string $paths The PSR-0 root directories
180
\* @param bool $prepend Whether to prepend the directories
181
\*
182
\* @return void
105
\* @param string $prefix The prefix
106
\* @param array|string $paths The PSR-0 root directories
107
\* @param bool $prepend Whether to prepend the directories
183
108
\*/
184
109
public function add($prefix, $paths, $prepend = false)
…
…
223
148
\* appending or prepending to the ones previously set for this namespace.
224
149
\*
225
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
226
\* @param string\[\]|string $paths The PSR-4 base directories
227
\* @param bool $prepend Whether to prepend the directories
150
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
151
\* @param array|string $paths The PSR-4 base directories
152
\* @param bool $prepend Whether to prepend the directories
228
153
\*
229
154
\* @throws \\InvalidArgumentException
230
\*
231
\* @return void
232
155
\*/
233
156
public function addPsr4($prefix, $paths, $prepend = false)
…
…
273
196
\* replacing any others previously set for this prefix.
274
197
\*
275
\* @param string $prefix The prefix
276
\* @param string\[\]|string $paths The PSR-0 base directories
277
\*
278
\* @return void
198
\* @param string $prefix The prefix
199
\* @param array|string $paths The PSR-0 base directories
279
200
\*/
280
201
public function set($prefix, $paths)
…
…
291
212
\* replacing any others previously set for this namespace.
292
213
\*
293
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
294
\* @param string\[\]|string $paths The PSR-4 base directories
214
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
215
\* @param array|string $paths The PSR-4 base directories
295
216
\*
296
217
\* @throws \\InvalidArgumentException
297
\*
298
\* @return void
299
218
\*/
300
219
public function setPsr4($prefix, $paths)
…
…
316
235
\*
317
236
\* @param bool $useIncludePath
318
\*
319
\* @return void
320
237
\*/
321
238
public function setUseIncludePath($useIncludePath)
…
…
340
257
\*
341
258
\* @param bool $classMapAuthoritative
342
\*
343
\* @return void
344
259
\*/
345
260
public function setClassMapAuthoritative($classMapAuthoritative)
…
…
362
277
\*
363
278
\* @param string|null $apcuPrefix
364
\*
365
\* @return void
366
279
\*/
367
280
public function setApcuPrefix($apcuPrefix)
…
…
384
297
\*
385
298
\* @param bool $prepend Whether to prepend the autoloader or not
386
\*
387
\* @return void
388
299
\*/
389
300
public function register($prepend = false)
390
301
{
391
302
spl\_autoload\_register(array($this, 'loadClass'), true, $prepend);
392
393
if (null === $this->vendorDir) {
394
return;
395
}
396
397
if ($prepend) {
398
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
} else {
400
unset(self::$registeredLoaders\[$this->vendorDir\]);
401
self::$registeredLoaders\[$this->vendorDir\] = $this;
402
}
403
303
}
404
304
405
305
/\*\*
406
306
\* Unregisters this instance as an autoloader.
407
\*
408
\* @return void
409
307
\*/
410
308
public function unregister()
411
309
{
412
310
spl\_autoload\_unregister(array($this, 'loadClass'));
413
414
if (null !== $this->vendorDir) {
415
unset(self::$registeredLoaders\[$this->vendorDir\]);
416
}
417
311
}
418
312
…
…
421
315
\*
422
316
\* @param string $class The name of the class
423
\* @return true|null True if loaded, null otherwise
317
\* @return bool|null True if loaded, null otherwise
424
318
\*/
425
319
public function loadClass($class)
…
…
430
324
return true;
431
325
}
432
433
return null;
434
326
}
435
327
…
…
476
368
}
477
369
478
/\*\*
479
\* Returns the currently registered loaders indexed by their corresponding vendor directories.
480
\*
481
\* @return self\[\]
482
\*/
483
public static function getRegisteredLoaders()
484
{
485
return self::$registeredLoaders;
486
}
487
488
/\*\*
489
\* @param string $class
490
\* @param string $ext
491
\* @return string|false
492
\*/
493
370
private function findFileWithExtension($class, $ext)
494
371
{
…
…
562
439
\*
563
440
\* Prevents access to $this/self from included files.
564
\*
565
\* @param string $file
566
\* @return void
567
\* @private
568
441
\*/
569
442
function includeFile($file)
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/InstalledVersions.php
r2667063
r2697388
21
21
\* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
22
\*
23
\* To require its presence, you can require \`composer-runtime-api ^2.0\`
23
\* To require it's presence, you can require \`composer-runtime-api ^2.0\`
24
24
\*/
25
25
class InstalledVersions
26
26
{
27
/\*\*
28
\* @var mixed\[\]|null
29
\* @psalm-var array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}|array{}|null
30
\*/
31
27
private static $installed;
32
33
/\*\*
34
\* @var bool|null
35
\*/
36
28
private static $canGetVendors;
37
38
/\*\*
39
\* @var array\[\]
40
\* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}>
41
\*/
42
29
private static $installedByVendor = array();
43
30
…
…
242
229
/\*\*
243
230
\* @return array
244
\* @psalm-return array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}
231
\* @psalm-return array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}
245
232
\*/
246
233
public static function getRootPackage()
…
…
256
243
\* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
257
244
\* @return array\[\]
258
\* @psalm-return array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}
245
\* @psalm-return array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>}
259
246
\*/
260
247
public static function getRawData()
…
…
279
266
\*
280
267
\* @return array\[\]
281
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}>
268
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>}>
282
269
\*/
283
270
public static function getAllRawData()
…
…
302
289
\* @return void
303
290
\*
304
\* @psalm-param array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>} $data
291
\* @psalm-param array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>} $data
305
292
\*/
306
293
public static function reload($data)
…
…
312
299
/\*\*
313
300
\* @return array\[\]
314
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}>
301
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>}>
315
302
\*/
316
303
private static function getInstalled()
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/LICENSE
r2667063
r2697388
1
2
1
Copyright (c) Nils Adermann, Jordi Boggiano
3
2
…
…
19
18
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
19
THE SOFTWARE.
21
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/autoload_classmap.php
r2667063
r2697388
7
7
8
8
return array(
9
'Composer\\\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
9
);
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/autoload_real.php
r2667063
r2697388
23
23
}
24
24
25
require \_\_DIR\_\_ . '/platform\_check.php';
26
27
25
spl\_autoload\_register(array('ComposerAutoloaderInitce2073d68aa3da842e5b37a3b60e999a', 'loadClassLoader'), true, true);
28
self::$loader = $loader = new \\Composer\\Autoload\\ClassLoader(\\dirname(\\dirname(\_\_FILE\_\_)));
26
self::$loader = $loader = new \\Composer\\Autoload\\ClassLoader();
29
27
spl\_autoload\_unregister(array('ComposerAutoloaderInitce2073d68aa3da842e5b37a3b60e999a', 'loadClassLoader'));
30
28
31
29
$useStaticLoader = PHP\_VERSION\_ID >= 50600 && !defined('HHVM\_VERSION') && (!function\_exists('zend\_loader\_file\_encoded') || !zend\_loader\_file\_encoded());
32
30
if ($useStaticLoader) {
33
require \_\_DIR\_\_ . '/autoload\_static.php';
31
require\_once \_\_DIR\_\_ . '/autoload\_static.php';
34
32
35
33
call\_user\_func(\\Composer\\Autoload\\ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::getInitializer($loader));
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/autoload_static.php
r2667063
r2697388
29
29
);
30
30
31
public static $classMap = array (
32
'Composer\\\\InstalledVersions' => \_\_DIR\_\_ . '/..' . '/composer/InstalledVersions.php',
33
);
34
35
31
public static function getInitializer(ClassLoader $loader)
36
32
{
…
…
38
34
$loader->prefixLengthsPsr4 = ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::$prefixLengthsPsr4;
39
35
$loader->prefixDirsPsr4 = ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::$prefixDirsPsr4;
40
$loader->classMap = ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::$classMap;
41
36
42
37
}, null, ClassLoader::class);
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/installed.json
r2667063
r2697388
1
{
2
"packages": \[
3
{
4
"name": "composer/installers",
5
"version": "v1.11.0",
6
"version\_normalized": "1.11.0.0",
7
"source": {
8
"type": "git",
9
"url": "https://github.com/composer/installers.git",
10
"reference": "ae03311f45dfe194412081526be2e003960df74b"
1
\[
2
{
3
"name": "composer/installers",
4
"version": "v1.11.0",
5
"version\_normalized": "1.11.0.0",
6
"source": {
7
"type": "git",
8
"url": "https://github.com/composer/installers.git",
9
"reference": "ae03311f45dfe194412081526be2e003960df74b"
10
},
11
"dist": {
12
"type": "zip",
13
"url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b",
14
"reference": "ae03311f45dfe194412081526be2e003960df74b",
15
"shasum": ""
16
},
17
"require": {
18
"composer-plugin-api": "^1.0 || ^2.0"
19
},
20
"replace": {
21
"roundcube/plugin-installer": "\*",
22
"shama/baton": "\*"
23
},
24
"require-dev": {
25
"composer/composer": "1.6.\* || ^2.0",
26
"composer/semver": "^1 || ^3",
27
"phpstan/phpstan": "^0.12.55",
28
"phpstan/phpstan-phpunit": "^0.12.16",
29
"symfony/phpunit-bridge": "^4.2 || ^5",
30
"symfony/process": "^2.3"
31
},
32
"time": "2021-04-28T06:42:17+00:00",
33
"type": "composer-plugin",
34
"extra": {
35
"class": "Composer\\\\Installers\\\\Plugin",
36
"branch-alias": {
37
"dev-main": "1.x-dev"
38
}
39
},
40
"installation-source": "dist",
41
"autoload": {
42
"psr-4": {
43
"Composer\\\\Installers\\\\": "src/Composer/Installers"
44
}
45
},
46
"notification-url": "https://packagist.org/downloads/",
47
"license": \[
48
"MIT"
49
\],
50
"authors": \[
51
{
52
"name": "Kyle Robinson Young",
53
"email": "[email protected]",
54
"homepage": "https://github.com/shama"
55
}
56
\],
57
"description": "A multi-framework Composer library installer",
58
"homepage": "https://composer.github.io/installers/",
59
"keywords": \[
60
"Craft",
61
"Dolibarr",
62
"Eliasis",
63
"Hurad",
64
"ImageCMS",
65
"Kanboard",
66
"Lan Management System",
67
"MODX Evo",
68
"MantisBT",
69
"Mautic",
70
"Maya",
71
"OXID",
72
"Plentymarkets",
73
"Porto",
74
"RadPHP",
75
"SMF",
76
"Starbug",
77
"Thelia",
78
"Whmcs",
79
"WolfCMS",
80
"agl",
81
"aimeos",
82
"annotatecms",
83
"attogram",
84
"bitrix",
85
"cakephp",
86
"chef",
87
"cockpit",
88
"codeigniter",
89
"concrete5",
90
"croogo",
91
"dokuwiki",
92
"drupal",
93
"eZ Platform",
94
"elgg",
95
"expressionengine",
96
"fuelphp",
97
"grav",
98
"installer",
99
"itop",
100
"joomla",
101
"known",
102
"kohana",
103
"laravel",
104
"lavalite",
105
"lithium",
106
"magento",
107
"majima",
108
"mako",
109
"mediawiki",
110
"miaoxing",
111
"modulework",
112
"modx",
113
"moodle",
114
"osclass",
115
"phpbb",
116
"piwik",
117
"ppi",
118
"processwire",
119
"puppet",
120
"pxcms",
121
"reindex",
122
"roundcube",
123
"shopware",
124
"silverstripe",
125
"sydes",
126
"sylius",
127
"symfony",
128
"tastyigniter",
129
"typo3",
130
"wordpress",
131
"yawik",
132
"zend",
133
"zikula"
134
\],
135
"support": {
136
"issues": "https://github.com/composer/installers/issues",
137
"source": "https://github.com/composer/installers/tree/v1.11.0"
138
},
139
"funding": \[
140
{
141
"url": "https://packagist.com",
142
"type": "custom"
11
143
},
12
"dist": {
13
"type": "zip",
14
"url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b",
15
"reference": "ae03311f45dfe194412081526be2e003960df74b",
16
"shasum": ""
144
{
145
"url": "https://github.com/composer",
146
"type": "github"
17
147
},
18
"require": {
19
"composer-plugin-api": "^1.0 || ^2.0"
20
},
21
"replace": {
22
"roundcube/plugin-installer": "\*",
23
"shama/baton": "\*"
24
},
25
"require-dev": {
26
"composer/composer": "1.6.\* || ^2.0",
27
"composer/semver": "^1 || ^3",
28
"phpstan/phpstan": "^0.12.55",
29
"phpstan/phpstan-phpunit": "^0.12.16",
30
"symfony/phpunit-bridge": "^4.2 || ^5",
31
"symfony/process": "^2.3"
32
},
33
"time": "2021-04-28T06:42:17+00:00",
34
"type": "composer-plugin",
35
"extra": {
36
"class": "Composer\\\\Installers\\\\Plugin",
37
"branch-alias": {
38
"dev-main": "1.x-dev"
39
}
40
},
41
"installation-source": "dist",
42
"autoload": {
43
"psr-4": {
44
"Composer\\\\Installers\\\\": "src/Composer/Installers"
45
}
46
},
47
"notification-url": "https://packagist.org/downloads/",
48
"license": \[
49
"MIT"
50
\],
51
"authors": \[
52
{
53
"name": "Kyle Robinson Young",
54
"email": "[email protected]",
55
"homepage": "https://github.com/shama"
56
}
57
\],
58
"description": "A multi-framework Composer library installer",
59
"homepage": "https://composer.github.io/installers/",
60
"keywords": \[
61
"Craft",
62
"Dolibarr",
63
"Eliasis",
64
"Hurad",
65
"ImageCMS",
66
"Kanboard",
67
"Lan Management System",
68
"MODX Evo",
69
"MantisBT",
70
"Mautic",
71
"Maya",
72
"OXID",
73
"Plentymarkets",
74
"Porto",
75
"RadPHP",
76
"SMF",
77
"Starbug",
78
"Thelia",
79
"Whmcs",
80
"WolfCMS",
81
"agl",
82
"aimeos",
83
"annotatecms",
84
"attogram",
85
"bitrix",
86
"cakephp",
87
"chef",
88
"cockpit",
89
"codeigniter",
90
"concrete5",
91
"croogo",
92
"dokuwiki",
93
"drupal",
94
"eZ Platform",
95
"elgg",
96
"expressionengine",
97
"fuelphp",
98
"grav",
99
"installer",
100
"itop",
101
"joomla",
102
"known",
103
"kohana",
104
"laravel",
105
"lavalite",
106
"lithium",
107
"magento",
108
"majima",
109
"mako",
110
"mediawiki",
111
"miaoxing",
112
"modulework",
113
"modx",
114
"moodle",
115
"osclass",
116
"phpbb",
117
"piwik",
118
"ppi",
119
"processwire",
120
"puppet",
121
"pxcms",
122
"reindex",
123
"roundcube",
124
"shopware",
125
"silverstripe",
126
"sydes",
127
"sylius",
128
"symfony",
129
"tastyigniter",
130
"typo3",
131
"wordpress",
132
"yawik",
133
"zend",
134
"zikula"
135
\],
136
"support": {
137
"issues": "https://github.com/composer/installers/issues",
138
"source": "https://github.com/composer/installers/tree/v1.11.0"
139
},
140
"funding": \[
141
{
142
"url": "https://packagist.com",
143
"type": "custom"
144
},
145
{
146
"url": "https://github.com/composer",
147
"type": "github"
148
},
149
{
150
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
151
"type": "tidelift"
152
}
153
\],
154
"install-path": "./installers"
155
},
156
{
157
"name": "stripe/stripe-php",
158
"version": "v7.47.0",
159
"version\_normalized": "7.47.0.0",
160
"source": {
161
"type": "git",
162
"url": "https://github.com/stripe/stripe-php.git",
163
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306"
164
},
165
"dist": {
166
"type": "zip",
167
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/b51656cb398d081fcee53a76f6edb8fd5c1a5306",
168
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306",
169
"shasum": ""
170
},
171
"require": {
172
"ext-curl": "\*",
173
"ext-json": "\*",
174
"ext-mbstring": "\*",
175
"php": ">=5.6.0"
176
},
177
"require-dev": {
178
"friendsofphp/php-cs-fixer": "2.16.1",
179
"php-coveralls/php-coveralls": "^2.1",
180
"phpunit/phpunit": "^5.7",
181
"squizlabs/php\_codesniffer": "^3.3",
182
"symfony/process": "~3.4"
183
},
184
"time": "2020-08-13T22:35:56+00:00",
185
"type": "library",
186
"extra": {
187
"branch-alias": {
188
"dev-master": "2.0-dev"
189
}
190
},
191
"installation-source": "dist",
192
"autoload": {
193
"psr-4": {
194
"Stripe\\\\": "lib/"
195
}
196
},
197
"notification-url": "https://packagist.org/downloads/",
198
"license": \[
199
"MIT"
200
\],
201
"authors": \[
202
{
203
"name": "Stripe and contributors",
204
"homepage": "https://github.com/stripe/stripe-php/contributors"
205
}
206
\],
207
"description": "Stripe PHP Library",
208
"homepage": "https://stripe.com/",
209
"keywords": \[
210
"api",
211
"payment processing",
212
"stripe"
213
\],
214
"support": {
215
"issues": "https://github.com/stripe/stripe-php/issues",
216
"source": "https://github.com/stripe/stripe-php/tree/v7.47.0"
217
},
218
"install-path": "../stripe/stripe-php"
148
{
149
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
150
"type": "tidelift"
151
}
152
\]
153
},
154
{
155
"name": "stripe/stripe-php",
156
"version": "v7.47.0",
157
"version\_normalized": "7.47.0.0",
158
"source": {
159
"type": "git",
160
"url": "https://github.com/stripe/stripe-php.git",
161
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306"
162
},
163
"dist": {
164
"type": "zip",
165
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/b51656cb398d081fcee53a76f6edb8fd5c1a5306",
166
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306",
167
"shasum": ""
168
},
169
"require": {
170
"ext-curl": "\*",
171
"ext-json": "\*",
172
"ext-mbstring": "\*",
173
"php": ">=5.6.0"
174
},
175
"require-dev": {
176
"friendsofphp/php-cs-fixer": "2.16.1",
177
"php-coveralls/php-coveralls": "^2.1",
178
"phpunit/phpunit": "^5.7",
179
"squizlabs/php\_codesniffer": "^3.3",
180
"symfony/process": "~3.4"
181
},
182
"time": "2020-08-13T22:35:56+00:00",
183
"type": "library",
184
"extra": {
185
"branch-alias": {
186
"dev-master": "2.0-dev"
187
}
188
},
189
"installation-source": "dist",
190
"autoload": {
191
"psr-4": {
192
"Stripe\\\\": "lib/"
193
}
194
},
195
"notification-url": "https://packagist.org/downloads/",
196
"license": \[
197
"MIT"
198
\],
199
"authors": \[
200
{
201
"name": "Stripe and contributors",
202
"homepage": "https://github.com/stripe/stripe-php/contributors"
203
}
204
\],
205
"description": "Stripe PHP Library",
206
"homepage": "https://stripe.com/",
207
"keywords": \[
208
"api",
209
"payment processing",
210
"stripe"
211
\],
212
"support": {
213
"issues": "https://github.com/stripe/stripe-php/issues",
214
"source": "https://github.com/stripe/stripe-php/tree/v7.47.0"
219
215
}
220
\],
221
"dev": false,
222
"dev-package-names": \[\]
223
}
216
}
217
\]
easy-digital-downloads/tags/2.11.6/includes/gateways/stripe/vendor/composer/installed.php
r2667063
r2697388
6
6
'install\_path' => \_\_DIR\_\_ . '/../../',
7
7
'aliases' => array(),
8
'reference' => 'a624654f272e48561b9fb698336f1e55c230df51',
8
'reference' => 'e7f98d164d4da798f7126fec7d294fce16299e5d',
9
9
'name' => 'easy-digital-downloads/edd-stripe',
10
10
'dev' => false,
…
…
26
26
'install\_path' => \_\_DIR\_\_ . '/../../',
27
27
'aliases' => array(),
28
'reference' => 'a624654f272e48561b9fb698336f1e55c230df51',
28
'reference' => 'e7f98d164d4da798f7126fec7d294fce16299e5d',
29
29
'dev\_requirement' => false,
30
30
),
easy-digital-downloads/tags/2.11.6/languages/easy-digital-downloads.pot
r2667063
r2697388
3
3
msgid ""
4
4
msgstr ""
5
"Project-Id-Version: Easy Digital Downloads 2.11.5\\n"
5
"Project-Id-Version: Easy Digital Downloads 2.11.6\\n"
6
6
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\\n"
7
"POT-Creation-Date: 2022-01-27 12:49:30+00:00\\n"
7
"POT-Creation-Date: 2022-03-22 00:09:47+00:00\\n"
8
8
"MIME-Version: 1.0\\n"
9
9
"Content-Type: text/plain; charset=utf-8\\n"
…
…
75
75
#: includes/admin/payments/actions.php:295
76
76
#: includes/admin/payments/actions.php:318
77
#: includes/admin/payments/actions.php:334
78
#: includes/admin/payments/actions.php:361
79
#: includes/admin/payments/actions.php:381
77
#: includes/admin/payments/actions.php:331
78
#: includes/admin/payments/actions.php:338
79
#: includes/admin/payments/actions.php:367
80
#: includes/admin/payments/actions.php:387
80
81
#: includes/admin/payments/view-order-details.php:22
81
82
#: includes/admin/payments/view-order-details.php:32
…
…
532
533
#: includes/admin/customers/class-customer-table.php:72
533
534
#: includes/admin/payments/class-payments-table.php:274
534
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:153
535
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:155
535
536
#: includes/admin/reporting/class-sales-logs-list-table.php:129
536
537
msgid "Customer"
…
…
674
675
#: includes/admin/import/import-functions.php:31
675
676
#: includes/admin/import/import-functions.php:113
677
#: includes/admin/payments/actions.php:331
676
678
#: includes/admin/reporting/export/export-actions.php:23
677
679
#: includes/api/class-edd-api.php:1980
…
…
927
929
#: includes/admin/reporting/class-export-payments.php:78
928
930
#: includes/admin/reporting/class-export.php:67
929
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:157
931
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:159
930
932
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:131
931
933
#: includes/admin/reporting/class-sales-logs-list-table.php:133
…
…
1019
1021
#: includes/admin/reporting/export/class-batch-export-downloads.php:56
1020
1022
msgid "Notes"
1023
msgstr ""
1024
1025
#: includes/admin/customers/customers.php:618
1026
#: includes/admin/payments/view-order-details.php:832
1027
msgid "Add Note"
1021
1028
msgstr ""
1022
1029
…
…
1302
1309
#: includes/admin/discounts/class-discount-codes-table.php:125
1303
1310
#: includes/admin/payments/class-payments-table.php:247
1304
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:320
1311
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:322
1305
1312
#: includes/admin/reporting/class-sales-logs-list-table.php:281
1306
1313
msgid "All"
…
…
2085
2092
msgstr ""
2086
2093
2087
#: includes/admin/extensions/product-education/class-email-marketing.php:91
2094
#: includes/admin/extensions/product-education/class-email-marketing.php:88
2088
2095
msgid ""
2089
2096
"Looks like you have an email marketing extension installed, but we support "
…
…
2181
2188
#: includes/admin/payments/actions.php:25
2182
2189
#: includes/admin/payments/actions.php:318
2183
#: includes/admin/payments/actions.php:334
2184
#: includes/admin/payments/actions.php:361
2185
#: includes/admin/payments/actions.php:381 includes/emails/actions.php:53
2190
#: includes/admin/payments/actions.php:338
2191
#: includes/admin/payments/actions.php:367
2192
#: includes/admin/payments/actions.php:387 includes/emails/actions.php:53
2186
2193
msgid "You do not have permission to edit this payment record"
2187
2194
msgstr ""
…
…
2711
2718
msgstr ""
2712
2719
2713
#: includes/admin/payments/view-order-details.php:832
2714
msgid "Add Note"
2715
msgstr ""
2716
2717
2720
#: includes/admin/plugins.php:27
2718
2721
msgid "General Settings"
…
…
2772
2775
msgstr ""
2773
2776
2774
#: includes/admin/promos/notices/class-license-upgrade-notice.php:151
2777
#: includes/admin/promos/notices/class-license-upgrade-notice.php:168
2775
2778
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2776
2779
msgid ""
2777
2780
"You are using the free version of Easy Digital Downloads. %1$sPurchase a "
2778
"pass%2$s to get email marketing tools and recurring payments."
2779
msgstr ""
2780
2781
#: includes/admin/promos/notices/class-license-upgrade-notice.php:161
2781
"pass%2$s to get email marketing tools and recurring payments. %3$sAlready "
2782
"have a Pass?%4$s"
2783
msgstr ""
2784
2785
#: includes/admin/promos/notices/class-license-upgrade-notice.php:180
2782
2786
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2783
2787
msgid ""
…
…
2786
2790
msgstr ""
2787
2791
2788
#: includes/admin/promos/notices/class-license-upgrade-notice.php:171
2792
#: includes/admin/promos/notices/class-license-upgrade-notice.php:190
2789
2793
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2790
2794
msgid ""
…
…
2793
2797
msgstr ""
2794
2798
2795
#: includes/admin/promos/notices/class-license-upgrade-notice.php:181
2799
#: includes/admin/promos/notices/class-license-upgrade-notice.php:201
2796
2800
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2797
2801
msgid ""
…
…
2800
2804
msgstr ""
2801
2805
2806
#: includes/admin/promos/notices/class-license-upgrade-notice.php:208
2807
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2808
msgid ""
2809
"Gain access to powerful insights to grow your traffic and revenue. %1$sGet "
2810
"MonsterInsights%2$s"
2811
msgstr ""
2812
2802
2813
#: includes/admin/reporting/class-api-requests-logs-list-table.php:87
2803
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:151
2814
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:153
2804
2815
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:126
2805
2816
#: includes/admin/reporting/class-sales-logs-list-table.php:128
…
…
2923
2934
2924
2935
#: includes/admin/reporting/class-export-download-history.php:64
2925
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:156
2936
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:158
2926
2937
#: includes/admin/reporting/export/class-batch-export-api-requests.php:41
2927
2938
#: includes/admin/reporting/export/class-batch-export-file-downloads.php:43
…
…
2938
2949
2939
2950
#: includes/admin/reporting/class-export-download-history.php:66
2940
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:155
2951
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:157
2941
2952
#: includes/admin/reporting/export/class-batch-export-file-downloads.php:45
2942
2953
msgid "File"
…
…
3033
3044
msgstr ""
3034
3045
3035
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:154
3046
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:156
3036
3047
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:127
3037
3048
#: includes/admin/reporting/class-sales-logs-list-table.php:132
…
…
7188
7199
#: includes/gateways/paypal-standard.php:475
7189
7200
#: includes/gateways/paypal-standard.php:482
7190
#: includes/gateways/paypal-standard.php:571
7191
#: includes/gateways/paypal-standard.php:581
7192
#: includes/gateways/paypal-standard.php:654
7193
#: includes/gateways/paypal-standard.php:663
7201
#: includes/gateways/paypal-standard.php:574
7202
#: includes/gateways/paypal-standard.php:584
7203
#: includes/gateways/paypal-standard.php:657
7204
#: includes/gateways/paypal-standard.php:666
7194
7205
msgid "IPN Error"
7195
7206
msgstr ""
…
…
7521
7532
7522
7533
#: includes/gateways/paypal/checkout-actions.php:399
7523
#: includes/gateways/paypal-standard.php:671
7534
#: includes/gateways/paypal-standard.php:674
7524
7535
#: tests/helpers/class-helper-payment.php:131
7525
7536
#: tests/helpers/class-helper-payment.php:234
…
…
7799
7810
msgstr ""
7800
7811
7801
#: includes/gateways/paypal-standard.php:571
7812
#: includes/gateways/paypal-standard.php:574
7802
7813
msgid "Invalid business email in IPN response. IPN data: %s"
7803
7814
msgstr ""
7804
7815
7805
#: includes/gateways/paypal-standard.php:574
7816
#: includes/gateways/paypal-standard.php:577
7806
7817
msgid "Payment failed due to invalid PayPal business email."
7807
7818
msgstr ""
7808
7819
7809
#: includes/gateways/paypal-standard.php:581
7820
#: includes/gateways/paypal-standard.php:584
7810
7821
msgid "Invalid currency in IPN response. IPN data: %s"
7811
7822
msgstr ""
7812
7823
7813
#: includes/gateways/paypal-standard.php:584
7824
#: includes/gateways/paypal-standard.php:587
7814
7825
msgid "Payment failed due to invalid currency in PayPal IPN."
7815
7826
msgstr ""
7816
7827
7817
#: includes/gateways/paypal-standard.php:654
7828
#: includes/gateways/paypal-standard.php:657
7818
7829
msgid "Invalid payment amount in IPN response. IPN data: %s"
7819
7830
msgstr ""
7820
7831
7821
#: includes/gateways/paypal-standard.php:657
7832
#: includes/gateways/paypal-standard.php:660
7822
7833
msgid "Payment failed due to invalid amount in PayPal IPN."
7823
7834
msgstr ""
7824
7835
7825
#: includes/gateways/paypal-standard.php:663
7836
#: includes/gateways/paypal-standard.php:666
7826
7837
msgid "Invalid purchase key in IPN response. IPN data: %s"
7827
7838
msgstr ""
7828
7839
7829
#: includes/gateways/paypal-standard.php:665
7840
#: includes/gateways/paypal-standard.php:668
7830
7841
msgid "Payment failed due to invalid purchase key in PayPal IPN."
7831
7842
msgstr ""
7832
7843
7833
#: includes/gateways/paypal-standard.php:685
7844
#: includes/gateways/paypal-standard.php:688
7834
7845
msgid "Payment made via eCheck and will clear automatically in 5-8 days"
7835
7846
msgstr ""
7836
7847
7837
#: includes/gateways/paypal-standard.php:692
7848
#: includes/gateways/paypal-standard.php:695
7838
7849
msgid ""
7839
7850
"Payment requires a confirmed customer address and must be accepted manually "
…
…
7841
7852
msgstr ""
7842
7853
7843
#: includes/gateways/paypal-standard.php:698
7854
#: includes/gateways/paypal-standard.php:701
7844
7855
msgid ""
7845
7856
"Payment must be accepted manually through PayPal due to international "
…
…
7847
7858
msgstr ""
7848
7859
7849
#: includes/gateways/paypal-standard.php:704
7860
#: includes/gateways/paypal-standard.php:707
7850
7861
msgid ""
7851
7862
"Payment received in non-shop currency and must be accepted manually through "
…
…
7853
7864
msgstr ""
7854
7865
7855
#: includes/gateways/paypal-standard.php:711
7866
#: includes/gateways/paypal-standard.php:714
7856
7867
msgid ""
7857
7868
"Payment is being reviewed by PayPal staff as high-risk or in possible "
…
…
7859
7870
msgstr ""
7860
7871
7861
#: includes/gateways/paypal-standard.php:717
7872
#: includes/gateways/paypal-standard.php:720
7862
7873
msgid "Payment was sent to non-confirmed or non-registered email address."
7863
7874
msgstr ""
7864
7875
7865
#: includes/gateways/paypal-standard.php:723
7876
#: includes/gateways/paypal-standard.php:726
7866
7877
msgid "PayPal account must be upgraded before this payment can be accepted"
7867
7878
msgstr ""
7868
7879
7869
#: includes/gateways/paypal-standard.php:729
7880
#: includes/gateways/paypal-standard.php:732
7870
7881
msgid ""
7871
7882
"PayPal account is not verified. Verify account in order to accept this "
…
…
7873
7884
msgstr ""
7874
7885
7875
#: includes/gateways/paypal-standard.php:735
7886
#: includes/gateways/paypal-standard.php:738
7876
7887
msgid ""
7877
7888
"Payment is pending for unknown reasons. Contact PayPal support for "
…
…
7879
7890
msgstr ""
7880
7891
7881
#: includes/gateways/paypal-standard.php:788
7892
#: includes/gateways/paypal-standard.php:791
7882
7893
msgid "Partial PayPal refund processed: %s"
7883
7894
msgstr ""
7884
7895
7885
#: includes/gateways/paypal-standard.php:793
7896
#: includes/gateways/paypal-standard.php:796
7886
7897
msgid "PayPal Payment #%s Refunded for reason: %s"
7887
7898
msgstr ""
7888
7899
7889
#: includes/gateways/paypal-standard.php:794
7900
#: includes/gateways/paypal-standard.php:797
7890
7901
msgid "PayPal Refund Transaction ID: %s"
7891
7902
msgstr ""
7892
7903
7893
#: includes/gateways/paypal-standard.php:1008
7904
#: includes/gateways/paypal-standard.php:1011
7894
7905
msgid ""
7895
7906
"Payment could not be verified while validating PayPal PDT. Missing payment "
…
…
7897
7908
msgstr ""
7898
7909
7899
#: includes/gateways/paypal-standard.php:1019
7910
#: includes/gateways/paypal-standard.php:1022
7900
7911
msgid ""
7901
7912
"Payment failed while validating PayPal PDT. Amount expected: %f. Amount "
…
…
7903
7914
msgstr ""
7904
7915
7905
#: includes/gateways/paypal-standard.php:1049
7916
#: includes/gateways/paypal-standard.php:1052
7906
7917
msgid "Payment failed while validating PayPal PDT."
7907
7918
msgstr ""
7908
7919
7909
#: includes/gateways/paypal-standard.php:1056
7920
#: includes/gateways/paypal-standard.php:1059
7910
7921
msgid "PayPal PDT encountered an unexpected result, payment set to pending"
7911
7922
msgstr ""
7912
7923
7913
#: includes/gateways/paypal-standard.php:1141
7924
#: includes/gateways/paypal-standard.php:1144
7914
7925
msgid "Refund Payment in PayPal"
7915
7926
msgstr ""
7916
7927
7917
#: includes/gateways/paypal-standard.php:1288
7928
#: includes/gateways/paypal-standard.php:1291
7918
7929
msgid "PayPal refund failed for unknown reason."
7919
7930
msgstr ""
7920
7931
7921
#: includes/gateways/paypal-standard.php:1298
7932
#: includes/gateways/paypal-standard.php:1301
7922
7933
msgid "PayPal refund transaction ID: %s"
7923
7934
msgstr ""
7924
7935
7925
#: includes/gateways/paypal-standard.php:1302
7936
#: includes/gateways/paypal-standard.php:1305
7926
7937
msgid "PayPal refund failed: %s"
7927
7938
msgstr ""
easy-digital-downloads/tags/2.11.6/readme.txt
r2677338
r2697388
6
6
Tags: ecommerce, e-commerce, sell, digital store, stripe
7
7
Requires at least: 4.4
8
Tested up to: 5.9
8
Tested up to: 5.9.2
9
9
Requires PHP: 5.4
10
Stable Tag: 2.11.5
10
Stable Tag: 2.11.6
11
11
License: GNU Version 2 or Any Later Version
12
12
…
…
65
65
\* Braintree
66
66
\* Authorize.net
67
\* 2Checkout
68
67
\* SOFORT Banking
69
68
…
…
241
240
242
241
\== Changelog ==
242
243
\= 2.11.6, March 21, 2022 =
244
\* Fix: Improved reliablity of PayPal Commerce modal while on checkout page.
245
\* Fix: PayPal Standard could throw an undefined variable notice when listening to the IPN.
246
\* Improvement: The link to configure Mailchimp could be wrong depending on the version of the extension.
247
\* Improvement: There was a hard coded string that wasn't able to be translated.
248
\* Improvement: Add a link to documentation about how to activate a Pass license key.
243
249
244
250
\= 2.11.5, January 27, 2022 =
easy-digital-downloads/trunk/assets/js/admin-scripts.js
r2667063
r2697388
748
748
action : 'edd\_insert\_payment\_note',
749
749
payment\_id : $(this).data('payment-id'),
750
nonce : $(this).data('nonce'),
750
751
note : $('#edd-payment-note').val()
751
752
};
easy-digital-downloads/trunk/assets/js/admin-scripts.min.js
r2667063
r2697388
1
jQuery(document).ready(function($){edd\_attach\_tooltips($(".edd-help-tip"));var EDD\_Download\_Configuration={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone\_repeatable:function(row){var key;highest=1;return row.parent().find(".edd\_repeatable\_row").each(function(){var current=$(this).data("key");parseInt(current)>highest&&(highest=current)}),key=highest+=1,clone=row.clone(),clone.removeClass("edd\_add\_blank"),clone.attr("data-key",key),clone.find("input, select, textarea").val("").each(function(){var name=$(this).attr("name"),id=$(this).attr("id");name&&(name=name.replace(/\\\[(\\d+)\\\]/,"\["+parseInt(key)+"\]"),$(this).attr("name",name)),$(this).attr("data-key",key),void 0!==id&&(id=id.replace(/(\\d+)/,parseInt(key)),$(this).attr("id",id))}),clone.find("select").each(function(){$(this).val(row.find('select\[name="'+$(this).attr("name")+'"\]').val())}),clone.find('input\[type="checkbox"\]').each(function(){$(this).is(":checked")&&$(this).prop("checked",!1),$(this).val(1)}),clone.find("span.edd\_price\_id").each(function(){$(this).text(parseInt(key))}),clone.find("span.edd\_file\_id").each(function(){$(this).text(parseInt(key))}),clone.find(".edd\_repeatable\_default\_input").each(function(){$(this).val(parseInt(key)).removeAttr("checked")}),clone.find(".edd\_repeatable\_index").each(function(){$(this).val(parseInt(key))}),clone.find(".edd\_repeatable\_condition\_field").each(function(){$(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd\_attach\_tooltips(clone.find(".edd-help-tip")),clone},add:function(){$(document.body).on("click",".submit .edd\_add\_repeatable",function(clone){clone.preventDefault();var row=$(this).parent().parent().prev(".edd\_repeatable\_row"),clone=EDD\_Download\_Configuration.clone\_repeatable(row);clone.insertAfter(row).find("input, textarea, select").filter(":visible").eq(0).focus(),clone.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}),clone.find(".edd-select-chosen").css("width","100%"),clone.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd\_vars.search\_placeholder)})},move:function(){$(".edd\_repeatable\_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd\_repeatable\_row",opacity:.6,cursor:"move",axis:"y",update:function(){var count=0;$(this).find(".edd\_repeatable\_row").each(function(){$(this).find("input.edd\_repeatable\_index").each(function(){$(this).val(count)}),count++})}})},remove:function(){$(document.body).on("click",".edd-remove-row, .edd\_remove\_repeatable",function(firstFocusable){firstFocusable.preventDefault();var row=$(this).parents(".edd\_repeatable\_row"),count=row.parent().find(".edd\_repeatable\_row").length,type=$(this).data("type"),repeatable="div.edd\_repeatable\_"+type+"s",price\_row\_id=$(this).is(".ui-sortable .edd\_repeatable\_row:first-child .edd-remove-row, .ui-sortable .edd\_repeatable\_row:first-child .edd\_remove\_repeatable")?row.next(".edd\_repeatable\_row"):row.prev(".edd\_repeatable\_row"),firstFocusable=price\_row\_id.find("select, input, textarea, button").filter(":visible").eq(0);if("price"===type&&(price\_row\_id=row.data("key"),$('.edd\_repeatable\_condition\_field option\[value="'+price\_row\_id+'"\]').remove()),1<count)$("input, select",row).val(""),row.fadeOut("fast").remove(),firstFocusable.focus();else switch(type){case"price":alert(edd\_vars.one\_price\_min);break;case"file":$("input, select",row).val("");break;default:alert(edd\_vars.one\_field\_min)}$(repeatable).each(function(rowIndex){$(this).find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+rowIndex+"\]");$(this).attr("name",name).attr("id",name)})})})},type:function(){$(document.body).on("change","#\_edd\_product\_type",function(e){var edd\_products=$("#edd\_products"),edd\_download\_files=$("#edd\_download\_files"),edd\_download\_limit\_wrap=$("#edd\_download\_limit\_wrap");"bundle"===$(this).val()?(edd\_products.show(),edd\_download\_files.hide(),edd\_download\_limit\_wrap.hide()):(edd\_products.hide(),edd\_download\_files.show(),edd\_download\_limit\_wrap.show())})},prices:function(){$(document.body).on("change","#edd\_variable\_pricing",function(e){var checked=$(this).is(":checked"),single=$("#edd\_regular\_price\_field"),variable=$("#edd\_variable\_price\_fields, .edd\_repeatable\_table .pricing"),bundleRow=$(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");checked?(single.hide(),variable.show(),bundleRow.addClass("has-variable-pricing")):(single.show(),variable.hide(),bundleRow.removeClass("has-variable-pricing"))})},files:function(){var file\_frame;window.formfield="",$(document.body).on("click",".edd\_upload\_file\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).closest(".edd\_repeatable\_upload\_wrapper"),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader-title"),button:{text:button.data("uploader-button-text")},multiple:"0"!=$(this).data("multiple")})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,clone){var row,selectedSize="image"===(attachment=attachment.toJSON()).type&&$(".attachment-display-settings .size option:selected").val(),selectedURL=attachment.url,selectedName=0<attachment.title.length?attachment.title:attachment.filename;selectedSize&&void 0!==attachment.sizes\[selectedSize\]&&(selectedURL=attachment.sizes\[selectedSize\].url),"image"===attachment.type&&(selectedName=selectedSize&&void 0!==attachment.sizes\[selectedSize\]?selectedName+"-"+attachment.sizes\[selectedSize\].width+"x"+attachment.sizes\[selectedSize\].height:selectedName+"-"+attachment.width+"x"+attachment.height),0===clone?(window.formfield.find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),window.formfield.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),window.formfield.find(".edd\_repeatable\_upload\_field").val(selectedURL),window.formfield.find(".edd\_repeatable\_name\_field").val(selectedName)):(row=window.formfield,(clone=EDD\_Download\_Configuration.clone\_repeatable(row)).find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),clone.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),clone.find(".edd\_repeatable\_upload\_field").val(selectedURL),clone.find(".edd\_repeatable\_name\_field").val(selectedName),clone.insertAfter(row))})})),file\_frame.open()}),window.formfield=""},updatePrices:function(){$("#edd\_price\_fields").on("keyup",".edd\_variable\_prices\_name",function(){var key=$(this).parents(".edd\_repeatable\_row").data("key"),name=$(this).val(),field\_option=$(".edd\_repeatable\_condition\_field option\[value="+key+"\]");0<field\_option.length?field\_option.text(name):$(".edd\_repeatable\_condition\_field").append($("<option></option>").attr("value",key).text(name))})}};$(document.body).on("click",".toggle-custom-price-option-section",function(header){header.preventDefault();var show=$(this).html()==edd\_vars.show\_advanced\_settings;show?$(this).html(edd\_vars.hide\_advanced\_settings):$(this).html(edd\_vars.show\_advanced\_settings);header=$(this).parents(".edd-repeatable-row-header");header.siblings(".edd-custom-price-option-sections-wrap").slideToggle(),$(":input:not(input\[type=button\],input\[type=submit\],button):visible:first",show?header.siblings(".edd-custom-price-option-sections-wrap"):header.siblings(".edd-repeatable-row-standard-fields")).focus()}),EDD\_Download\_Configuration.init();var typingTimer,edd\_datepicker=$(".edd\_datepicker");0<edd\_datepicker.length&&edd\_datepicker.datepicker({dateFormat:"mm/dd/yy"}),{init:function(){this.edit\_address(),this.remove\_download(),this.add\_download(),this.change\_customer(),this.new\_customer(),this.edit\_price(),this.recalculate\_total(),this.variable\_prices\_check(),this.add\_note(),this.remove\_note(),this.resend\_receipt(),this.copy\_download\_link()},edit\_address:function(){$('select\[name="edd-payment-address\[0\]\[country\]"\]').change(function(){var data=$(this),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd-payment-address\[0\]\[state\]"};return $.post(ajaxurl,data,function(response){var state\_wrapper=$("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");$("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==response?state\_wrapper.replaceWith('<input type="text" name="edd-payment-address\[0\]\[state\]" value="" class="edd-edit-toggles medium-text"/>'):state\_wrapper.replaceWith(response)}),!1})},remove\_download:function(){$("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var key,download\_id,price\_id,quantity,amount,fees,currently\_removed;return 1===$(document.body).find("#edd-purchased-files > .row:not(.header)").length?alert(edd\_vars.one\_download\_min):confirm(edd\_vars.delete\_payment\_download)&&(key=$(this).data("key"),$(".edd-payment-id").val(),download\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[id\]"\]').val(),price\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[price\_id\]"\]').val(),quantity=$('input\[name="edd-payment-details-downloads\['+key+'\]\[quantity\]"\]').val(),amount=$('input\[name="edd-payment-details-downloads\['+key+'\]\[amount\]"\]').val(),$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').length&&(fees=$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').val()),$('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').length&&(fees=$.parseJSON($('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').val())),currently\_removed=$('input\[name="edd-payment-removed"\]').val(),(currently\_removed=(currently\_removed=$.parseJSON(currently\_removed)).length<1?{}:currently\_removed)\[key\]=\[{id:download\_id,price\_id:price\_id,quantity:quantity,amount:amount,cart\_index:key}\],$('input\[name="edd-payment-removed"\]').val(JSON.stringify(currently\_removed)),$(this).parent().parent().remove(),fees&&fees.length&&$.each(fees,function(key,value){$('\*li\[data-fee-id="'+value+'"\]').remove()}),$("#edd-payment-downloads-changed").val(1),$(".edd-order-payment-recalc-totals").show()),!1})},change\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(cancel){cancel.preventDefault();var change\_customer=$(this).hasClass("edd-payment-change-customer"),cancel=$(this).hasClass("edd-payment-change-customer-cancel");change\_customer?($(".customer-info").hide(),$(".change-customer").show(),$(".edd-payment-change-customer-input").css("width","auto")):cancel&&($(".customer-info").show(),$(".change-customer").hide())})},new\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(cancel){cancel.preventDefault();var new\_customer=$(this).hasClass("edd-payment-new-customer"),cancel=$(this).hasClass("edd-payment-new-customer-cancel");new\_customer?($(".customer-info").hide(),$(".new-customer").show()):cancel&&($(".customer-info").show(),$(".new-customer").hide());new\_customer=$("#edd-new-customer");$(".new-customer").is(":visible")?new\_customer.val(1):new\_customer.val(0)})},add\_download:function(){$(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(download\_title){download\_title.preventDefault();var quantity=$("#edd\_order\_download\_select"),item\_price=$("#edd-order-download-quantity"),item\_total=$("#edd-order-download-price"),price\_id=$("#edd-order-download-tax"),clone=$(".edd\_price\_options\_select option:selected"),download\_id=quantity.val(),download\_title=quantity.find(":selected").text(),quantity=item\_price.val(),item\_price=item\_total.val(),item\_total=price\_id.val(),price\_id=clone.val(),clone=clone.text();if(download\_id<1)return!1;if(item\_price=item\_price||0,item\_price=parseFloat(item\_price),isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;if(item\_total=parseFloat(item\_total),isNaN(item\_total))return alert(edd\_vars.numeric\_item\_tax),!1;if(isNaN(parseInt(quantity)))return alert(edd\_vars.numeric\_quantity),!1;clone&&(download\_title=download\_title+" - "+clone);var count=$("#edd-purchased-files div.row:not(.edd-purchased-files-header)").length;0==count&&alert(edd\_vars.no\_downloads\_error);clone=$("#edd-purchased-files div.row:not(.edd-purchased-files-header):last").clone();clone.find(".download span").html('<a href="post.php?post='+download\_id+'&action=edit"></a>'),clone.find(".download span a").text(download\_title),clone.find(".edd-payment-details-download-item-price").val(item\_price.toFixed(edd\_vars.currency\_decimals)),clone.find(".edd-payment-details-download-item-tax").val(item\_total.toFixed(edd\_vars.currency\_decimals)),clone.find("input.edd-payment-details-download-id").val(download\_id),clone.find("input.edd-payment-details-download-price-id").val(price\_id);item\_total=(item\_total=item\_price\*quantity+item\_total).toFixed(edd\_vars.currency\_decimals);clone.find("span.edd-payment-details-download-amount").text(item\_total),clone.find("input.edd-payment-details-download-amount").val(item\_total),clone.find("input.edd-payment-details-download-quantity").val(quantity),clone.find("input.edd-payment-details-download-has-log").val(0),clone.find(".edd-copy-download-link-wrapper").remove(),clone.find("input").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("a.edd-order-remove-download").attr("data-key",parseInt(count)),$("#edd-payment-downloads-changed").val(1),$("#edd-purchased-files div.row .edd-purchased-download-title .deleted").length&&$("#edd-purchased-files div.row:last").remove(),$(clone).insertAfter("#edd-purchased-files div.row:last"),$(".edd-order-payment-recalc-totals").show(),$(".edd-add-download-field").val("")})},edit\_price:function(){$(document.body).on("change keyup",".edd-payment-item-input",function(){var row=$(this).parents("ul.edd-purchased-files-list-wrapper");$(".edd-order-payment-recalc-totals").show();var quantity=row.find("input.edd-payment-details-download-quantity").val().replace(edd\_vars.thousands\_separator,""),item\_price=row.find("input.edd-payment-details-download-item-price").val().replace(edd\_vars.thousands\_separator,""),item\_total=row.find("input.edd-payment-details-download-item-tax").val().replace(edd\_vars.thousands\_separator,""),item\_price=parseFloat(item\_price);if(isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;item\_total=parseFloat(item\_total),isNaN(item\_total)&&(item\_total=0);item\_total=(item\_total=item\_price\*(quantity=isNaN(parseInt(quantity))?1:quantity)+item\_total).toFixed(edd\_vars.currency\_decimals);row.find("input.edd-payment-details-download-amount").val(item\_total),row.find("span.edd-payment-details-download-amount").text(item\_total)})},recalculate\_total:function(){$("#edd-order-recalc-total").on("click",function(taxes){taxes.preventDefault();var total=0,tax=0,totals=$("#edd-purchased-files .row input.edd-payment-details-download-amount"),taxes=$("#edd-purchased-files .row input.edd-payment-details-download-item-tax");totals.length&&totals.each(function(){total+=parseFloat($(this).val())}),taxes.length&&taxes.each(function(){tax+=parseFloat($(this).val())}),$(".edd-payment-fees").length&&$(".edd-payment-fees span.fee-amount").each(function(){total+=parseFloat($(this).data("fee"))}),$("input\[name=edd-payment-total\]").val(total.toFixed(edd\_vars.currency\_decimals)),$("input\[name=edd-payment-tax\]").val(tax.toFixed(edd\_vars.currency\_decimals))})},variable\_prices\_check:function(){$(".edd-edit-purchase-element").on("change","select#edd\_order\_download\_select",function(){var $this=$(this),download\_id=$this.val();0<parseInt(download\_id)&&$.ajax({type:"POST",data:{action:"edd\_check\_for\_download\_price\_variations",download\_id:download\_id},url:ajaxurl,success:function(response){$(".edd\_price\_options\_select").remove(),$(response).insertAfter($this.next())}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})},add\_note:function(){$("#edd-add-payment-note").on("click",function(postData){postData.preventDefault();var border\_color,postData={action:"edd\_insert\_payment\_note",payment\_id:$(this).data("payment-id"),note:$("#edd-payment-note").val()};postData.note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-payment-notes-inner").append(response),$(".edd-no-payment-notes").hide(),$("#edd-payment-note").val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=$("#edd-payment-note").css("border-color"),$("#edd-payment-note").css("border-color","red"),setTimeout(function(){$("#edd-payment-note").css("border-color",border\_color)},500))})},remove\_note:function(){$(document.body).on("click",".edd-delete-payment-note",function(e){if(e.preventDefault(),confirm(edd\_vars.delete\_payment\_note)){var postData={action:"edd\_delete\_payment\_note",payment\_id:$(this).data("payment-id"),note\_id:$(this).data("note-id")};return $.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){return $("#edd-payment-note-"+postData.note\_id).remove(),$(".edd-payment-note").length||$(".edd-no-payment-notes").show(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!0}})},resend\_receipt:function(){var emails\_wrap=$(".edd-order-resend-receipt-addresses");$(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),emails\_wrap.slideDown()}),$(document.body).on("change",".edd-order-resend-receipt-email",function(){var href=$("#edd-select-receipt-email").prop("href")+"&email="+$(this).val();confirm(edd\_vars.resend\_receipt)&&(window.location=href)}),$(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd\_vars.resend\_receipt)})},copy\_download\_link:function(){$(document.body).on("click",".edd-copy-download-link",function(postData){postData.preventDefault();postData=$(this),postData={action:"edd\_get\_file\_download\_link",payment\_id:$('input\[name="edd\_payment\_id"\]').val(),download\_id:postData.data("download-id"),price\_id:postData.data("price-id")};$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(link){return $("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+link+"</textarea>"),$("#edd-download-link-textarea").focus().select(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})}}.init(),{init:function(){this.type\_select(),this.product\_requirements()},type\_select:function(){$("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var val=$(this).val();$(".edd-amount-description").hide(),$(".edd-amount-description."+val+"-discount").show()})},product\_requirements:function(){$("#products").change(function(){var product\_conditions=$("#edd-discount-product-conditions");$(this).val()?product\_conditions.show():product\_conditions.hide()})}}.init(),{init:function(){this.date\_options(),this.customers\_export()},date\_options:function(){$("#edd-graphs-date-options").change(function(){var $this=$(this),date\_range\_options=$("#edd-date-range-options");"other"===$this.val()?date\_range\_options.show():date\_range\_options.hide()})},customers\_export:function(){$("#edd\_customer\_export\_download").change(function(){var price\_options\_select,$this=$(this),data=$("option:selected",$this).val(),customer\_export\_option=$("#edd\_customer\_export\_option");"0"===$this.val()?customer\_export\_option.show():customer\_export\_option.hide(),0!=parseInt(data)?(data={action:"edd\_check\_for\_download\_price\_variations",download\_id:data,all\_prices:!0},price\_options\_select=$(".edd\_price\_options\_select"),$.post(ajaxurl,data,function(response){price\_options\_select.remove(),$("#edd\_customer\_export\_download\_chosen").after(response)})):price\_options\_select.remove()})}}.init(),{init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var file\_frame,edd\_settings\_upload\_button=$(".edd-color-picker");edd\_settings\_upload\_button.length&&edd\_settings\_upload\_button.wpColorPicker(),"undefined"==typeof wp||"1"!==edd\_vars.new\_media\_ui?0<(edd\_settings\_upload\_button=$(".edd\_settings\_upload\_button")).length&&(window.formfield="",$(document.body).on("click",edd\_settings\_upload\_button,function(e){e.preventDefault(),window.formfield=$(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(html){window.formfield?(imgurl=$("a","<div>"+html+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe\_interval),tb\_remove()):window.edd\_send\_to\_editor(html),window.send\_to\_editor=window.edd\_send\_to\_editor,window.formfield="",window.imagefield=!1}):(window.formfield="",$(document.body).on("click",".edd\_settings\_upload\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).parent().prev(),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader\_title"),button:{text:button.data("uploader\_button\_text")},multiple:!1})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,index){attachment=attachment.toJSON(),window.formfield.val(attachment.url)})})),file\_frame.open()}),window.formfield="")},taxes:function(){var no\_states=$("select.edd-no-states");no\_states.length&&no\_states.closest("tr").addClass("hidden"),$('select\[name="edd\_settings\[base\_country\]"\]').change(function(){var data=$(this),$tr=data.closest("tr"),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd\_settings\[base\_state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?$tr.next().addClass("hidden"):($tr.next().removeClass("hidden"),$tr.next().find("select").replaceWith(response))}),!1}),$(document.body).on("change","#edd\_tax\_rates select.edd-tax-country",function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:$this.attr("name").replace("country","state")};return $.post(ajaxurl,data,function(response){var text\_field;"nostates"==response?(text\_field='<input type="text" name="'+data.field\_name+'" value=""/>',$this.parent().next().find("select").replaceWith(text\_field)):($this.parent().next().find("input,select").show(),$this.parent().next().find("input,select").replaceWith(response))}),!1}),$("#edd\_add\_tax\_rate").on("click",function(){var row=$("#edd\_tax\_rates tr:last"),clone=row.clone(),count=row.parent().find("tr").length;return clone.find("td input").not(":input\[type=checkbox\]").val(""),clone.find('td \[type="checkbox"\]').attr("checked",!1),clone.find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("label").each(function(){var name=(name=$(this).attr("for")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("for",name)}),clone.insertAfter(row),!1}),$(document.body).on("click","#edd\_tax\_rates .edd\_remove\_tax\_rate",function(){return confirm(edd\_vars.delete\_tax\_rate)&&(2===$("#edd\_tax\_rates tr:visible").length?($("#edd\_tax\_rates select").val(""),$('#edd\_tax\_rates input\[type="text"\]').val(""),$('#edd\_tax\_rates input\[type="number"\]').val(""),$('#edd\_tax\_rates input\[type="checkbox"\]').attr("checked",!1)):$(this).closest("tr").remove(),$("#edd\_tax\_rates tr").each(function(rowIndex){$(this).children().find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+(rowIndex-1)+"\]");$(this).attr("name",name).attr("id",name)})})),!1})},emails:function(){$("#edd-recapture-connect").on("click",function(e){e.preventDefault(),$(this).html(edd\_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy\_digital\_downloads\_recapture\_remote\_install()})},misc:function(){var downloadMethod=$('select\[name="edd\_settings\[download\_method\]"\]'),symlink=downloadMethod.parent().parent().next();"direct"==downloadMethod.val()&&(symlink.hide(),symlink.find("input").prop("checked",!1)),downloadMethod.on("change",function(){"direct"==$(this).val()?(symlink.hide(),symlink.find("input").prop("checked",!1)):symlink.show()})}}.init(),$(".download\_page\_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return!!confirm(edd\_vars.delete\_payment)}),$("body").on("click","#the-list .editinline",function(){var post\_id=(post\_id=$(this).closest("tr").attr("id")).replace("post-",""),regprice=$("#post-"+post\_id).find(".column-price .downloadprice-"+post\_id).val();regprice!=$("#post-"+post\_id+".column-price .downloadprice-"+post\_id).val()?$(".regprice","#edd-download-data").val(regprice).attr("disabled",!1):$(".regprice","#edd-download-data").val(edd\_vars.quick\_edit\_warning).attr("disabled","disabled")}),$(document.body).on("click","#bulk\_edit",function(){var $price=$("#bulk-edit"),$post\_ids=new Array;$price.find("#bulk-titles").children().each(function(){$post\_ids.push($(this).attr("id").replace(/^(ttle)/i,""))});$price=$('#edd-download-data input\[name="\_edd\_regprice"\]').val();$.post(ajaxurl,{action:"edd\_save\_bulk\_edit",edd\_bulk\_nonce:$post\_ids,post\_ids:$post\_ids,price:$price})}),$(".edd-select-chosen").chosen({inherit\_select\_classes:!0,placeholder\_text\_single:edd\_vars.one\_option,placeholder\_text\_multiple:edd\_vars.one\_or\_more\_option}),$(".edd-select-chosen .chosen-search input").each(function(){var placeholder=$(this).parent().parent().parent().prev("select.edd-select-chosen"),placeholder=(placeholder.data("search-type"),placeholder.data("search-placeholder"));$(this).attr("placeholder",placeholder)}),$(".chosen-choices").on("click",function(){var placeholder=$(this).parent().prev().data("search-placeholder");void 0===placeholder&&(placeholder=edd\_vars.type\_to\_search),$(this).children("li").children("input").attr("placeholder",placeholder)});$(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(lastKey){var val=$(this).val(),container=$(this).closest(".edd-select-chosen"),select=(container.attr("id").replace("\_chosen",""),container.prev()),no\_bundles=container.hasClass("no-bundles"),variations=container.hasClass("variations"),lastKey=lastKey.which,search\_type="edd\_download\_search";if(container.prev().data("search-type")){if("no\_ajax"==select.data("search-type"))return;search\_type="edd\_"+select.data("search-type")+"\_search"}val.length<=3&&"edd\_download\_search"==search\_type||16==lastKey||13==lastKey||91==lastKey||17==lastKey||37==lastKey||38==lastKey||39==lastKey||40==lastKey||(clearTimeout(typingTimer),typingTimer=setTimeout(function(){$.ajax({type:"GET",url:ajaxurl,data:{action:search\_type,s:val,no\_bundles:no\_bundles,variations:variations},dataType:"json",beforeSend:function(){select.closest("ul.chosen-results").empty()},success:function(data){$("option:not(:selected)",select).remove(),$.each(data,function(key,item){$('option\[value="'+item.id+'"\]',select).length||select.prepend('<option value="'+item.id+'">'+item.name+"</option>")}),$(".edd-select-chosen").trigger("chosen:updated"),select.next().find("input").val(val)}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){})},342))}),$("#post").on("click",".edd-thickbox",function(){$(".edd-select-chosen","#choose-download").css("width","100%")}),{init:function(){this.revoke\_api\_key(),this.regenerate\_api\_key(),this.create\_api\_key(),this.recount\_stats()},revoke\_api\_key:function(){$(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd\_vars.revoke\_api\_key)})},regenerate\_api\_key:function(){$(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd\_vars.regenerate\_api\_key)})},create\_api\_key:function(){$(document.body).on("submit","#api-key-generate-form",function(e){var input=$('input\[type="text"\]\[name="user\_id"\]');input.css("border-color","#ddd");var user\_id=input.val();if(user\_id.length<1||0==user\_id)return input.css("border-color","#ff0000"),!1})},recount\_stats:function(){$(document.body).on("change","#recount-stats-type",function(){var export\_form=$("#edd-tools-recount-form"),selected\_type=$("option:selected",this).data("type"),submit\_button=$("#recount-stats-submit"),products=$("#tools-product-dropdown");export\_form.find(".notice-wrap").remove(),submit\_button.removeClass("button-disabled").attr("disabled",!1),products.hide(),$(".edd-recount-stats-descriptions span").hide(),"recount-download"===selected\_type?(products.show(),products.find(".edd-select-chosen").css("width","auto")):"reset-stats"===selected\_type?(export\_form.append('<div class="notice-wrap"></div>'),export\_form.find(".notice-wrap").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>"),$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")):(products.hide(),products.val(0)),$("#"+selected\_type).show()}),$(document.body).on("change","#confirm-reset",function(){$(this).is(":checked")?$("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),$("#edd-tools-recount-form").submit(function(e){var selection=$("#recount-stats-type").val(),export\_form=$(this),selected\_type=$("option:selected",this).data("type");if("reset-stats"===selected\_type){if($("#confirm-reset").is(":checked"))return!0;has\_errors=!0}export\_form.find(".notice-wrap").remove(),export\_form.append('<div class="notice-wrap"></div>');var notice\_wrap=export\_form.find(".notice-wrap"),has\_errors=!1;if(null!==selection&&0!==selection||(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_class+"</p></div>"),has\_errors=!0),"recount-download"===selected\_type&&0==$('select\[name="download\_id"\]').val()&&(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_reqs+"</p></div>"),has\_errors=!0),has\_errors)return export\_form.find(".button-disabled").removeClass("button-disabled"),!1})}}.init(),{init:function(){this.submit(),this.dismiss\_message()},submit:function(){var self=this;$(document.body).on("submit",".edd-export-form",function(data){data.preventDefault();var submitButton=$(this).find('input\[type="submit"\]');submitButton.hasClass("button-disabled")||(data=$(this).serialize(),submitButton.addClass("button-disabled"),$(this).find(".notice-wrap").remove(),$(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),self.process\_step(1,data,self))})},process\_step:function(step,data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:data,action:"edd\_do\_ajax\_export",step:step},dataType:"json",success:function(response){var export\_form,notice\_wrap,success\_message;"done"==response.step||response.error||response.success?(notice\_wrap=(export\_form=$(".edd-export-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),export\_form.find(".button-disabled").removeClass("button-disabled"),response.error?(success\_message=response.message,notice\_wrap.html('<div class="updated error"><p>'+success\_message+"</p></div>")):response.success?(success\_message=response.message,notice\_wrap.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+success\_message+'<span class="notice-dismiss"></span></p></div>')):(notice\_wrap.remove(),window.location=response.url)):($(".edd-progress div").animate({width:response.percentage+"%"},50,function(){}),self.process\_step(parseInt(response.step),data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})},dismiss\_message:function(){$(document.body).on("click","#edd-batch-success .notice-dismiss",function(){$("#edd-batch-success").parent().slideUp("fast")})}}.init();var EDD\_Import={init:function(){this.submit()},submit:function(){$(".edd-import-form").ajaxForm({beforeSubmit:this.before\_submit,success:this.success,complete:this.complete,dataType:"json",error:this.error})},before\_submit:function(arr,notice\_wrap,options){if(notice\_wrap.find(".notice-wrap").remove(),notice\_wrap.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 import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");return import\_form.find(".button-disabled").removeClass("button-disabled"),notice\_wrap.html('<div class="update error"><p>'+edd\_vars.unsupported\_browser+"</p></div>"),!1}},success:function(responseText,statusText,xhr,$form){},complete:function(xhr){var $form,select,options,columns,response=jQuery.parseJSON(xhr.responseText);response.success?(($form=$(".edd-import-form .notice-wrap").parent()).find(".edd-import-file-wrap,.notice-wrap").remove(),$form.find(".edd-import-options").slideDown(),(select=$form.find("select.edd-import-csv-column")).parents("tr").first(),options="",columns=response.data.columns.sort(function(a,b){return a<b?-1:b<a?1:0}),$.each(columns,function(key,value){options+='<option value="'+value+'">'+value+"</option>"}),select.append(options),select.on("change",function(){var $key=$(this).val();$key&&0!=response.data.first\_row\[$key\]?$(this).parent().next().html(response.data.first\_row\[$key\]):$(this).parent().next().html("")}),$.each(select,function(){$(this).val($(this).attr("data-field")).change()}),$(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),$form.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),response.data.mapping=$form.serialize(),EDD\_Import.process\_step(1,response.data,self)})):EDD\_Import.error(xhr)},error:function(notice\_wrap){var response=jQuery.parseJSON(notice\_wrap.responseText),import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):notice\_wrap.remove()},process\_step:function(step,import\_data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:import\_data.form,nonce:import\_data.nonce,class:import\_data.class,upload:import\_data.upload,mapping:import\_data.mapping,action:"edd\_do\_ajax\_import",step:step},dataType:"json",success:function(response){var import\_form,notice\_wrap;"done"==response.data.step||response.data.error?(notice\_wrap=(import\_form=$(".edd-import-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):(import\_form.find(".edd-import-options").hide(),$("html, body").animate({scrollTop:import\_form.parent().offset().top},500),notice\_wrap.html('<div class="updated"><p>'+response.data.message+"</p></div>"))):($(".edd-progress div").animate({width:response.data.percentage+"%"},50,function(){}),EDD\_Import.process\_step(parseInt(response.data.step),import\_data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})}};EDD\_Import.init();var EDD\_Customer={vars:{customer\_card\_wrap\_editable:$(".edd-customer-card-wrapper .editable"),customer\_card\_wrap\_edit\_item:$(".edd-customer-card-wrapper .edit-item"),user\_id:$('input\[name="customerinfo\[user\_id\]"\]'),state\_input:$(':input\[name="customerinfo\[state\]"\]'),note:$("#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(){$(document.body).on("click","#edit-customer",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_editable.hide(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.fadeIn().css("display","block")})},add\_email:function(){$(document.body).on("click","#add-customer-email",function(nonce){nonce.preventDefault();var button=$(this),wrapper=button.parent();wrapper.parent().find(".notice-container").remove(),wrapper.find(".spinner").css("visibility","visible"),button.attr("disabled",!0);var customer\_id=wrapper.find('input\[name="customer-id"\]').val(),email=wrapper.find('input\[name="additional-email"\]').val(),primary=wrapper.find('input\[name="make-additional-primary"\]').is(":checked"),nonce=wrapper.find('input\[name="add\_email\_nonce"\]').val();$.post(ajaxurl,{edd\_action:"customer-add-email",customer\_id:customer\_id,email:email,primary:primary,\_wpnonce:nonce},function(response){!0===response.success?window.location.href=response.redirect:(button.attr("disabled",!1),wrapper.after('<div class="notice-container"><div class="notice notice-error inline"><p>'+response.message+"</p></div></div>"),wrapper.find(".spinner").css("visibility","hidden"))},"json")})},user\_search:function(){$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results a",function(user\_id){user\_id.preventDefault();user\_id=$(this).data("userid");EDD\_Customer.vars.user\_id.val(user\_id)})},remove\_user:function(){$(document.body).on("click","#disconnect-customer",function(postData){postData.preventDefault(),confirm(edd\_vars.disconnect\_customer)&&(postData={edd\_action:"disconnect-userid",customer\_id:$('input\[name="customerinfo\[id\]"\]').val(),\_wpnonce:$("#edit-customer-info #\_wpnonce").val()},$.post(ajaxurl,postData,function(response){window.location.href=window.location.href},"json"))})},cancel\_edit:function(){$(document.body).on("click","#edd-edit-customer-cancel",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.hide(),EDD\_Customer.vars.customer\_card\_wrap\_editable.show(),$(".edd\_user\_search\_results").html("")})},change\_country:function(){$('select\[name="customerinfo\[country\]"\]').change(function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:"customerinfo\[state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?EDD\_Customer.vars.state\_input.replaceWith('<input type="text" name="'+data.field\_name+'" value="" class="edd-edit-toggles medium-text"/>'):EDD\_Customer.vars.state\_input.replaceWith(response)}),!1})},add\_note:function(){$(document.body).on("click","#add-customer-note",function(postData){postData.preventDefault();var border\_color,postData={edd\_action:"add-customer-note",customer\_id:$("#customer-id").val(),customer\_note:EDD\_Customer.vars.note.val(),add\_customer\_note\_nonce:$("#add\_customer\_note\_nonce").val()};postData.customer\_note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-customer-notes").prepend(response),$(".edd-no-customer-notes").hide(),EDD\_Customer.vars.note.val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=EDD\_Customer.vars.note.css("border-color"),EDD\_Customer.vars.note.css("border-color","red"),setTimeout(function(){EDD\_Customer.vars.note.css("border-color",border\_color)},500))})},delete\_checked:function(){$("#edd-customer-delete-confirm").change(function(){var records\_input=$("#edd-customer-delete-records"),submit\_button=$("#edd-delete-customer");$(this).prop("checked")?(records\_input.attr("disabled",!1),submit\_button.attr("disabled",!1)):(records\_input.attr("disabled",!0),records\_input.prop("checked",!1),submit\_button.attr("disabled",!0))})}};EDD\_Customer.init();var EDD\_Promo\_Notices={init:function(){EDD\_Promo\_Notices.displayNotices(),EDD\_Promo\_Notices.dismissNotices()},displayNotices:function(){var topOfPageNoticeEl,topOfPageNotice=$(".edd-admin-notice-top-of-page");topOfPageNotice&&(topOfPageNoticeEl=topOfPageNotice.detach(),$("#wpbody-content").prepend(topOfPageNoticeEl),topOfPageNotice.delay(1e3).slideDown())},dismissNotices:function(){$(".edd-promo-notice").each(function(){var notice=$(this);notice.on("click",".edd-promo-notice-dismiss",function(e){$(this).attr("href")||e.preventDefault(),$.ajax({type:"POST",data:{action:"edd\_dismiss\_promo\_notice",notice\_id:notice.data("id"),nonce:notice.data("nonce"),lifespan:notice.data("lifespan")},url:ajaxurl,success:function(response){notice.slideUp()}})})})}};EDD\_Promo\_Notices.init(),$(".edd-ajax-user-search").keyup(function(){var user\_search=$(this).val(),data="";$(this).data("exclude")&&(data=$(this).data("exclude")),$(".edd-ajax").show();data={action:"edd\_search\_users",user\_name:user\_search,exclude:data};document.body.style.cursor="wait",$.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(search\_response){$(".edd-ajax").hide(),$(".edd\_user\_search\_results").removeClass("hidden"),$(".edd\_user\_search\_results span").html(""),$(search\_response.results).appendTo(".edd\_user\_search\_results span"),document.body.style.cursor="default"}})}),$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results span a",function(login){login.preventDefault();login=$(this).data("login");$(".edd-ajax-user-search").val(login),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$(document.body).on("click.eddCancelUserSearch",".edd\_user\_search\_results a.edd-ajax-user-cancel",function(e){e.preventDefault(),$(".edd-ajax-user-search").val(""),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$("#edd\_dashboard\_sales").length&&$.ajax({type:"GET",data:{action:"edd\_load\_dashboard\_widget"},url:ajaxurl,success:function(response){$("#edd\_dashboard\_sales .edd-loading").html(response)}}),$(document.body).on("keydown",".customer-note-input",function(e){13==e.keyCode&&(e.metaKey||e.ctrlKey)&&$("#add-customer-note").click()}),$(document.body).on("click","#edd-disable-debug-log",function(e){e.preventDefault(),$(this).attr("disabled",!0);var notice=$("#edd-debug-log-notice");$.ajax({type:"GET",data:{action:"edd\_disable\_debugging",nonce:$("#edd\_debug\_log\_delete").val()},url:ajaxurl,success:function(response){notice.empty().append(response.data),setTimeout(function(){notice.slideUp()},3e3)}}).fail(function(response){notice.empty().append(response.responseJSON.data)})})});var eddFormatCurrency=function(decimalPlaces){var numeric=parseFloat(decimalPlaces),storeCurrency=edd\_vars.currency,decimalPlaces=edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"currency",currency:storeCurrency,minimumFractionDigits:decimalPlaces,maximumFractionDigits:decimalPlaces})},eddFormatNumber=function(storeCurrency){var numeric=parseFloat(storeCurrency),storeCurrency=edd\_vars.currency;edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(label,series){return'<div style="font-size:12px; text-align:center; padding:2px">'+label+"</div>"},eddLegendFormatterSales=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatNumber(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item},eddLegendFormatterEarnings=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatCurrency(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item};function edd\_attach\_tooltips(selector){selector.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function easy\_digital\_downloads\_recapture\_remote\_install(){jQuery.post(ajaxurl,{action:"edd\_recapture\_remote\_install"},function(response){0==response.success&&confirm(response.data.error)?location.reload():window.location.href="https://recapture.io/register"})}
1
jQuery(document).ready(function($){edd\_attach\_tooltips($(".edd-help-tip"));var EDD\_Download\_Configuration={init:function(){this.add(),this.move(),this.remove(),this.type(),this.prices(),this.files(),this.updatePrices()},clone\_repeatable:function(row){var key;highest=1;return row.parent().find(".edd\_repeatable\_row").each(function(){var current=$(this).data("key");parseInt(current)>highest&&(highest=current)}),key=highest+=1,clone=row.clone(),clone.removeClass("edd\_add\_blank"),clone.attr("data-key",key),clone.find("input, select, textarea").val("").each(function(){var name=$(this).attr("name"),id=$(this).attr("id");name&&(name=name.replace(/\\\[(\\d+)\\\]/,"\["+parseInt(key)+"\]"),$(this).attr("name",name)),$(this).attr("data-key",key),void 0!==id&&(id=id.replace(/(\\d+)/,parseInt(key)),$(this).attr("id",id))}),clone.find("select").each(function(){$(this).val(row.find('select\[name="'+$(this).attr("name")+'"\]').val())}),clone.find('input\[type="checkbox"\]').each(function(){$(this).is(":checked")&&$(this).prop("checked",!1),$(this).val(1)}),clone.find("span.edd\_price\_id").each(function(){$(this).text(parseInt(key))}),clone.find("span.edd\_file\_id").each(function(){$(this).text(parseInt(key))}),clone.find(".edd\_repeatable\_default\_input").each(function(){$(this).val(parseInt(key)).removeAttr("checked")}),clone.find(".edd\_repeatable\_index").each(function(){$(this).val(parseInt(key))}),clone.find(".edd\_repeatable\_condition\_field").each(function(){$(this).find("option:eq(0)").prop("selected","selected")}),clone.find(".search-choice").remove(),clone.find(".chosen-container").remove(),edd\_attach\_tooltips(clone.find(".edd-help-tip")),clone},add:function(){$(document.body).on("click",".submit .edd\_add\_repeatable",function(clone){clone.preventDefault();var row=$(this).parent().parent().prev(".edd\_repeatable\_row"),clone=EDD\_Download\_Configuration.clone\_repeatable(row);clone.insertAfter(row).find("input, textarea, select").filter(":visible").eq(0).focus(),clone.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}),clone.find(".edd-select-chosen").css("width","100%"),clone.find(".edd-select-chosen .chosen-search input").attr("placeholder",edd\_vars.search\_placeholder)})},move:function(){$(".edd\_repeatable\_table .edd-repeatables-wrap").sortable({handle:".edd-draghandle-anchor",items:".edd\_repeatable\_row",opacity:.6,cursor:"move",axis:"y",update:function(){var count=0;$(this).find(".edd\_repeatable\_row").each(function(){$(this).find("input.edd\_repeatable\_index").each(function(){$(this).val(count)}),count++})}})},remove:function(){$(document.body).on("click",".edd-remove-row, .edd\_remove\_repeatable",function(firstFocusable){firstFocusable.preventDefault();var row=$(this).parents(".edd\_repeatable\_row"),count=row.parent().find(".edd\_repeatable\_row").length,type=$(this).data("type"),repeatable="div.edd\_repeatable\_"+type+"s",price\_row\_id=$(this).is(".ui-sortable .edd\_repeatable\_row:first-child .edd-remove-row, .ui-sortable .edd\_repeatable\_row:first-child .edd\_remove\_repeatable")?row.next(".edd\_repeatable\_row"):row.prev(".edd\_repeatable\_row"),firstFocusable=price\_row\_id.find("select, input, textarea, button").filter(":visible").eq(0);if("price"===type&&(price\_row\_id=row.data("key"),$('.edd\_repeatable\_condition\_field option\[value="'+price\_row\_id+'"\]').remove()),1<count)$("input, select",row).val(""),row.fadeOut("fast").remove(),firstFocusable.focus();else switch(type){case"price":alert(edd\_vars.one\_price\_min);break;case"file":$("input, select",row).val("");break;default:alert(edd\_vars.one\_field\_min)}$(repeatable).each(function(rowIndex){$(this).find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+rowIndex+"\]");$(this).attr("name",name).attr("id",name)})})})},type:function(){$(document.body).on("change","#\_edd\_product\_type",function(e){var edd\_products=$("#edd\_products"),edd\_download\_files=$("#edd\_download\_files"),edd\_download\_limit\_wrap=$("#edd\_download\_limit\_wrap");"bundle"===$(this).val()?(edd\_products.show(),edd\_download\_files.hide(),edd\_download\_limit\_wrap.hide()):(edd\_products.hide(),edd\_download\_files.show(),edd\_download\_limit\_wrap.show())})},prices:function(){$(document.body).on("change","#edd\_variable\_pricing",function(e){var checked=$(this).is(":checked"),single=$("#edd\_regular\_price\_field"),variable=$("#edd\_variable\_price\_fields, .edd\_repeatable\_table .pricing"),bundleRow=$(".edd-bundled-product-row, .edd-repeatable-row-standard-fields");checked?(single.hide(),variable.show(),bundleRow.addClass("has-variable-pricing")):(single.show(),variable.hide(),bundleRow.removeClass("has-variable-pricing"))})},files:function(){var file\_frame;window.formfield="",$(document.body).on("click",".edd\_upload\_file\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).closest(".edd\_repeatable\_upload\_wrapper"),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader-title"),button:{text:button.data("uploader-button-text")},multiple:"0"!=$(this).data("multiple")})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,clone){var row,selectedSize="image"===(attachment=attachment.toJSON()).type&&$(".attachment-display-settings .size option:selected").val(),selectedURL=attachment.url,selectedName=0<attachment.title.length?attachment.title:attachment.filename;selectedSize&&void 0!==attachment.sizes\[selectedSize\]&&(selectedURL=attachment.sizes\[selectedSize\].url),"image"===attachment.type&&(selectedName=selectedSize&&void 0!==attachment.sizes\[selectedSize\]?selectedName+"-"+attachment.sizes\[selectedSize\].width+"x"+attachment.sizes\[selectedSize\].height:selectedName+"-"+attachment.width+"x"+attachment.height),0===clone?(window.formfield.find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),window.formfield.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),window.formfield.find(".edd\_repeatable\_upload\_field").val(selectedURL),window.formfield.find(".edd\_repeatable\_name\_field").val(selectedName)):(row=window.formfield,(clone=EDD\_Download\_Configuration.clone\_repeatable(row)).find(".edd\_repeatable\_attachment\_id\_field").val(attachment.id),clone.find(".edd\_repeatable\_thumbnail\_size\_field").val(selectedSize),clone.find(".edd\_repeatable\_upload\_field").val(selectedURL),clone.find(".edd\_repeatable\_name\_field").val(selectedName),clone.insertAfter(row))})})),file\_frame.open()}),window.formfield=""},updatePrices:function(){$("#edd\_price\_fields").on("keyup",".edd\_variable\_prices\_name",function(){var key=$(this).parents(".edd\_repeatable\_row").data("key"),name=$(this).val(),field\_option=$(".edd\_repeatable\_condition\_field option\[value="+key+"\]");0<field\_option.length?field\_option.text(name):$(".edd\_repeatable\_condition\_field").append($("<option></option>").attr("value",key).text(name))})}};$(document.body).on("click",".toggle-custom-price-option-section",function(header){header.preventDefault();var show=$(this).html()==edd\_vars.show\_advanced\_settings;show?$(this).html(edd\_vars.hide\_advanced\_settings):$(this).html(edd\_vars.show\_advanced\_settings);header=$(this).parents(".edd-repeatable-row-header");header.siblings(".edd-custom-price-option-sections-wrap").slideToggle(),$(":input:not(input\[type=button\],input\[type=submit\],button):visible:first",show?header.siblings(".edd-custom-price-option-sections-wrap"):header.siblings(".edd-repeatable-row-standard-fields")).focus()}),EDD\_Download\_Configuration.init();var typingTimer,edd\_datepicker=$(".edd\_datepicker");0<edd\_datepicker.length&&edd\_datepicker.datepicker({dateFormat:"mm/dd/yy"}),{init:function(){this.edit\_address(),this.remove\_download(),this.add\_download(),this.change\_customer(),this.new\_customer(),this.edit\_price(),this.recalculate\_total(),this.variable\_prices\_check(),this.add\_note(),this.remove\_note(),this.resend\_receipt(),this.copy\_download\_link()},edit\_address:function(){$('select\[name="edd-payment-address\[0\]\[country\]"\]').change(function(){var data=$(this),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd-payment-address\[0\]\[state\]"};return $.post(ajaxurl,data,function(response){var state\_wrapper=$("#edd-order-address-state-wrap select, #edd-order-address-state-wrap input");$("#edd-order-address-state-wrap .chosen-container").remove(),"nostates"==response?state\_wrapper.replaceWith('<input type="text" name="edd-payment-address\[0\]\[state\]" value="" class="edd-edit-toggles medium-text"/>'):state\_wrapper.replaceWith(response)}),!1})},remove\_download:function(){$("#edd-purchased-files").on("click",".edd-order-remove-download",function(){var key,download\_id,price\_id,quantity,amount,fees,currently\_removed;return 1===$(document.body).find("#edd-purchased-files > .row:not(.header)").length?alert(edd\_vars.one\_download\_min):confirm(edd\_vars.delete\_payment\_download)&&(key=$(this).data("key"),$(".edd-payment-id").val(),download\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[id\]"\]').val(),price\_id=$('input\[name="edd-payment-details-downloads\['+key+'\]\[price\_id\]"\]').val(),quantity=$('input\[name="edd-payment-details-downloads\['+key+'\]\[quantity\]"\]').val(),amount=$('input\[name="edd-payment-details-downloads\['+key+'\]\[amount\]"\]').val(),$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').length&&(fees=$('input\[name="edd-payment-details-downloads\['+key+'\]\[tax\]"\]').val()),$('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').length&&(fees=$.parseJSON($('input\[name="edd-payment-details-downloads\['+key+'\]\[fees\]"\]').val())),currently\_removed=$('input\[name="edd-payment-removed"\]').val(),(currently\_removed=(currently\_removed=$.parseJSON(currently\_removed)).length<1?{}:currently\_removed)\[key\]=\[{id:download\_id,price\_id:price\_id,quantity:quantity,amount:amount,cart\_index:key}\],$('input\[name="edd-payment-removed"\]').val(JSON.stringify(currently\_removed)),$(this).parent().parent().remove(),fees&&fees.length&&$.each(fees,function(key,value){$('\*li\[data-fee-id="'+value+'"\]').remove()}),$("#edd-payment-downloads-changed").val(1),$(".edd-order-payment-recalc-totals").show()),!1})},change\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-change-customer, .edd-payment-change-customer-cancel",function(cancel){cancel.preventDefault();var change\_customer=$(this).hasClass("edd-payment-change-customer"),cancel=$(this).hasClass("edd-payment-change-customer-cancel");change\_customer?($(".customer-info").hide(),$(".change-customer").show(),$(".edd-payment-change-customer-input").css("width","auto")):cancel&&($(".customer-info").show(),$(".change-customer").hide())})},new\_customer:function(){$("#edd-customer-details").on("click",".edd-payment-new-customer, .edd-payment-new-customer-cancel",function(cancel){cancel.preventDefault();var new\_customer=$(this).hasClass("edd-payment-new-customer"),cancel=$(this).hasClass("edd-payment-new-customer-cancel");new\_customer?($(".customer-info").hide(),$(".new-customer").show()):cancel&&($(".customer-info").show(),$(".new-customer").hide());new\_customer=$("#edd-new-customer");$(".new-customer").is(":visible")?new\_customer.val(1):new\_customer.val(0)})},add\_download:function(){$(".edd-edit-purchase-element").on("click","#edd-order-add-download",function(download\_title){download\_title.preventDefault();var quantity=$("#edd\_order\_download\_select"),item\_price=$("#edd-order-download-quantity"),item\_total=$("#edd-order-download-price"),price\_id=$("#edd-order-download-tax"),clone=$(".edd\_price\_options\_select option:selected"),download\_id=quantity.val(),download\_title=quantity.find(":selected").text(),quantity=item\_price.val(),item\_price=item\_total.val(),item\_total=price\_id.val(),price\_id=clone.val(),clone=clone.text();if(download\_id<1)return!1;if(item\_price=item\_price||0,item\_price=parseFloat(item\_price),isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;if(item\_total=parseFloat(item\_total),isNaN(item\_total))return alert(edd\_vars.numeric\_item\_tax),!1;if(isNaN(parseInt(quantity)))return alert(edd\_vars.numeric\_quantity),!1;clone&&(download\_title=download\_title+" - "+clone);var count=$("#edd-purchased-files div.row:not(.edd-purchased-files-header)").length;0==count&&alert(edd\_vars.no\_downloads\_error);clone=$("#edd-purchased-files div.row:not(.edd-purchased-files-header):last").clone();clone.find(".download span").html('<a href="post.php?post='+download\_id+'&action=edit"></a>'),clone.find(".download span a").text(download\_title),clone.find(".edd-payment-details-download-item-price").val(item\_price.toFixed(edd\_vars.currency\_decimals)),clone.find(".edd-payment-details-download-item-tax").val(item\_total.toFixed(edd\_vars.currency\_decimals)),clone.find("input.edd-payment-details-download-id").val(download\_id),clone.find("input.edd-payment-details-download-price-id").val(price\_id);item\_total=(item\_total=item\_price\*quantity+item\_total).toFixed(edd\_vars.currency\_decimals);clone.find("span.edd-payment-details-download-amount").text(item\_total),clone.find("input.edd-payment-details-download-amount").val(item\_total),clone.find("input.edd-payment-details-download-quantity").val(quantity),clone.find("input.edd-payment-details-download-has-log").val(0),clone.find(".edd-copy-download-link-wrapper").remove(),clone.find("input").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("a.edd-order-remove-download").attr("data-key",parseInt(count)),$("#edd-payment-downloads-changed").val(1),$("#edd-purchased-files div.row .edd-purchased-download-title .deleted").length&&$("#edd-purchased-files div.row:last").remove(),$(clone).insertAfter("#edd-purchased-files div.row:last"),$(".edd-order-payment-recalc-totals").show(),$(".edd-add-download-field").val("")})},edit\_price:function(){$(document.body).on("change keyup",".edd-payment-item-input",function(){var row=$(this).parents("ul.edd-purchased-files-list-wrapper");$(".edd-order-payment-recalc-totals").show();var quantity=row.find("input.edd-payment-details-download-quantity").val().replace(edd\_vars.thousands\_separator,""),item\_price=row.find("input.edd-payment-details-download-item-price").val().replace(edd\_vars.thousands\_separator,""),item\_total=row.find("input.edd-payment-details-download-item-tax").val().replace(edd\_vars.thousands\_separator,""),item\_price=parseFloat(item\_price);if(isNaN(item\_price))return alert(edd\_vars.numeric\_item\_price),!1;item\_total=parseFloat(item\_total),isNaN(item\_total)&&(item\_total=0);item\_total=(item\_total=item\_price\*(quantity=isNaN(parseInt(quantity))?1:quantity)+item\_total).toFixed(edd\_vars.currency\_decimals);row.find("input.edd-payment-details-download-amount").val(item\_total),row.find("span.edd-payment-details-download-amount").text(item\_total)})},recalculate\_total:function(){$("#edd-order-recalc-total").on("click",function(taxes){taxes.preventDefault();var total=0,tax=0,totals=$("#edd-purchased-files .row input.edd-payment-details-download-amount"),taxes=$("#edd-purchased-files .row input.edd-payment-details-download-item-tax");totals.length&&totals.each(function(){total+=parseFloat($(this).val())}),taxes.length&&taxes.each(function(){tax+=parseFloat($(this).val())}),$(".edd-payment-fees").length&&$(".edd-payment-fees span.fee-amount").each(function(){total+=parseFloat($(this).data("fee"))}),$("input\[name=edd-payment-total\]").val(total.toFixed(edd\_vars.currency\_decimals)),$("input\[name=edd-payment-tax\]").val(tax.toFixed(edd\_vars.currency\_decimals))})},variable\_prices\_check:function(){$(".edd-edit-purchase-element").on("change","select#edd\_order\_download\_select",function(){var $this=$(this),download\_id=$this.val();0<parseInt(download\_id)&&$.ajax({type:"POST",data:{action:"edd\_check\_for\_download\_price\_variations",download\_id:download\_id},url:ajaxurl,success:function(response){$(".edd\_price\_options\_select").remove(),$(response).insertAfter($this.next())}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})},add\_note:function(){$("#edd-add-payment-note").on("click",function(postData){postData.preventDefault();var border\_color,postData={action:"edd\_insert\_payment\_note",payment\_id:$(this).data("payment-id"),nonce:$(this).data("nonce"),note:$("#edd-payment-note").val()};postData.note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-payment-notes-inner").append(response),$(".edd-no-payment-notes").hide(),$("#edd-payment-note").val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=$("#edd-payment-note").css("border-color"),$("#edd-payment-note").css("border-color","red"),setTimeout(function(){$("#edd-payment-note").css("border-color",border\_color)},500))})},remove\_note:function(){$(document.body).on("click",".edd-delete-payment-note",function(e){if(e.preventDefault(),confirm(edd\_vars.delete\_payment\_note)){var postData={action:"edd\_delete\_payment\_note",payment\_id:$(this).data("payment-id"),note\_id:$(this).data("note-id")};return $.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){return $("#edd-payment-note-"+postData.note\_id).remove(),$(".edd-payment-note").length||$(".edd-no-payment-notes").show(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)}),!0}})},resend\_receipt:function(){var emails\_wrap=$(".edd-order-resend-receipt-addresses");$(document.body).on("click","#edd-select-receipt-email",function(e){e.preventDefault(),emails\_wrap.slideDown()}),$(document.body).on("change",".edd-order-resend-receipt-email",function(){var href=$("#edd-select-receipt-email").prop("href")+"&email="+$(this).val();confirm(edd\_vars.resend\_receipt)&&(window.location=href)}),$(document.body).on("click","#edd-resend-receipt",function(e){return confirm(edd\_vars.resend\_receipt)})},copy\_download\_link:function(){$(document.body).on("click",".edd-copy-download-link",function(postData){postData.preventDefault();postData=$(this),postData={action:"edd\_get\_file\_download\_link",payment\_id:$('input\[name="edd\_payment\_id"\]').val(),download\_id:postData.data("download-id"),price\_id:postData.data("price-id")};$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(link){return $("#edd-download-link").dialog({width:400}).html('<textarea rows="10" cols="40" id="edd-download-link-textarea">'+link+"</textarea>"),$("#edd-download-link-textarea").focus().select(),!1}}).fail(function(data){window.console&&window.console.log&&console.log(data)})})}}.init(),{init:function(){this.type\_select(),this.product\_requirements()},type\_select:function(){$("#edd-edit-discount #edd-type, #edd-add-discount #edd-type").change(function(){var val=$(this).val();$(".edd-amount-description").hide(),$(".edd-amount-description."+val+"-discount").show()})},product\_requirements:function(){$("#products").change(function(){var product\_conditions=$("#edd-discount-product-conditions");$(this).val()?product\_conditions.show():product\_conditions.hide()})}}.init(),{init:function(){this.date\_options(),this.customers\_export()},date\_options:function(){$("#edd-graphs-date-options").change(function(){var $this=$(this),date\_range\_options=$("#edd-date-range-options");"other"===$this.val()?date\_range\_options.show():date\_range\_options.hide()})},customers\_export:function(){$("#edd\_customer\_export\_download").change(function(){var price\_options\_select,$this=$(this),data=$("option:selected",$this).val(),customer\_export\_option=$("#edd\_customer\_export\_option");"0"===$this.val()?customer\_export\_option.show():customer\_export\_option.hide(),0!=parseInt(data)?(data={action:"edd\_check\_for\_download\_price\_variations",download\_id:data,all\_prices:!0},price\_options\_select=$(".edd\_price\_options\_select"),$.post(ajaxurl,data,function(response){price\_options\_select.remove(),$("#edd\_customer\_export\_download\_chosen").after(response)})):price\_options\_select.remove()})}}.init(),{init:function(){this.general(),this.taxes(),this.emails(),this.misc()},general:function(){var file\_frame,edd\_settings\_upload\_button=$(".edd-color-picker");edd\_settings\_upload\_button.length&&edd\_settings\_upload\_button.wpColorPicker(),"undefined"==typeof wp||"1"!==edd\_vars.new\_media\_ui?0<(edd\_settings\_upload\_button=$(".edd\_settings\_upload\_button")).length&&(window.formfield="",$(document.body).on("click",edd\_settings\_upload\_button,function(e){e.preventDefault(),window.formfield=$(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(html){window.formfield?(imgurl=$("a","<div>"+html+"</div>").attr("href"),window.formfield.val(imgurl),window.clearInterval(window.tbframe\_interval),tb\_remove()):window.edd\_send\_to\_editor(html),window.send\_to\_editor=window.edd\_send\_to\_editor,window.formfield="",window.imagefield=!1}):(window.formfield="",$(document.body).on("click",".edd\_settings\_upload\_button",function(button){button.preventDefault();button=$(this);window.formfield=$(this).parent().prev(),file\_frame||((file\_frame=wp.media.frames.file\_frame=wp.media({frame:"post",state:"insert",title:button.data("uploader\_title"),button:{text:button.data("uploader\_button\_text")},multiple:!1})).on("menu:render:default",function(view){view.unset("library-separator"),view.unset("gallery"),view.unset("featured-image"),view.unset("embed"),view.set({})}),file\_frame.on("insert",function(){file\_frame.state().get("selection").each(function(attachment,index){attachment=attachment.toJSON(),window.formfield.val(attachment.url)})})),file\_frame.open()}),window.formfield="")},taxes:function(){var no\_states=$("select.edd-no-states");no\_states.length&&no\_states.closest("tr").addClass("hidden"),$('select\[name="edd\_settings\[base\_country\]"\]').change(function(){var data=$(this),$tr=data.closest("tr"),data={action:"edd\_get\_shop\_states",country:data.val(),nonce:data.data("nonce"),field\_name:"edd\_settings\[base\_state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?$tr.next().addClass("hidden"):($tr.next().removeClass("hidden"),$tr.next().find("select").replaceWith(response))}),!1}),$(document.body).on("change","#edd\_tax\_rates select.edd-tax-country",function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:$this.attr("name").replace("country","state")};return $.post(ajaxurl,data,function(response){var text\_field;"nostates"==response?(text\_field='<input type="text" name="'+data.field\_name+'" value=""/>',$this.parent().next().find("select").replaceWith(text\_field)):($this.parent().next().find("input,select").show(),$this.parent().next().find("input,select").replaceWith(response))}),!1}),$("#edd\_add\_tax\_rate").on("click",function(){var row=$("#edd\_tax\_rates tr:last"),clone=row.clone(),count=row.parent().find("tr").length;return clone.find("td input").not(":input\[type=checkbox\]").val(""),clone.find('td \[type="checkbox"\]').attr("checked",!1),clone.find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("name",name).attr("id",name)}),clone.find("label").each(function(){var name=(name=$(this).attr("for")).replace(/\\\[(\\d+)\\\]/,"\["+parseInt(count)+"\]");$(this).attr("for",name)}),clone.insertAfter(row),!1}),$(document.body).on("click","#edd\_tax\_rates .edd\_remove\_tax\_rate",function(){return confirm(edd\_vars.delete\_tax\_rate)&&(2===$("#edd\_tax\_rates tr:visible").length?($("#edd\_tax\_rates select").val(""),$('#edd\_tax\_rates input\[type="text"\]').val(""),$('#edd\_tax\_rates input\[type="number"\]').val(""),$('#edd\_tax\_rates input\[type="checkbox"\]').attr("checked",!1)):$(this).closest("tr").remove(),$("#edd\_tax\_rates tr").each(function(rowIndex){$(this).children().find("input, select").each(function(){var name=(name=$(this).attr("name")).replace(/\\\[(\\d+)\\\]/,"\["+(rowIndex-1)+"\]");$(this).attr("name",name).attr("id",name)})})),!1})},emails:function(){$("#edd-recapture-connect").on("click",function(e){e.preventDefault(),$(this).html(edd\_vars.wait+' <span class="edd-loading"></span>'),document.body.style.cursor="wait",easy\_digital\_downloads\_recapture\_remote\_install()})},misc:function(){var downloadMethod=$('select\[name="edd\_settings\[download\_method\]"\]'),symlink=downloadMethod.parent().parent().next();"direct"==downloadMethod.val()&&(symlink.hide(),symlink.find("input").prop("checked",!1)),downloadMethod.on("change",function(){"direct"==$(this).val()?(symlink.hide(),symlink.find("input").prop("checked",!1)):symlink.show()})}}.init(),$(".download\_page\_edd-payment-history .row-actions .delete a, a.edd-delete-payment").on("click",function(){return!!confirm(edd\_vars.delete\_payment)}),$("body").on("click","#the-list .editinline",function(){var post\_id=(post\_id=$(this).closest("tr").attr("id")).replace("post-",""),regprice=$("#post-"+post\_id).find(".column-price .downloadprice-"+post\_id).val();regprice!=$("#post-"+post\_id+".column-price .downloadprice-"+post\_id).val()?$(".regprice","#edd-download-data").val(regprice).attr("disabled",!1):$(".regprice","#edd-download-data").val(edd\_vars.quick\_edit\_warning).attr("disabled","disabled")}),$(document.body).on("click","#bulk\_edit",function(){var $price=$("#bulk-edit"),$post\_ids=new Array;$price.find("#bulk-titles").children().each(function(){$post\_ids.push($(this).attr("id").replace(/^(ttle)/i,""))});$price=$('#edd-download-data input\[name="\_edd\_regprice"\]').val();$.post(ajaxurl,{action:"edd\_save\_bulk\_edit",edd\_bulk\_nonce:$post\_ids,post\_ids:$post\_ids,price:$price})}),$(".edd-select-chosen").chosen({inherit\_select\_classes:!0,placeholder\_text\_single:edd\_vars.one\_option,placeholder\_text\_multiple:edd\_vars.one\_or\_more\_option}),$(".edd-select-chosen .chosen-search input").each(function(){var placeholder=$(this).parent().parent().parent().prev("select.edd-select-chosen"),placeholder=(placeholder.data("search-type"),placeholder.data("search-placeholder"));$(this).attr("placeholder",placeholder)}),$(".chosen-choices").on("click",function(){var placeholder=$(this).parent().prev().data("search-placeholder");void 0===placeholder&&(placeholder=edd\_vars.type\_to\_search),$(this).children("li").children("input").attr("placeholder",placeholder)});$(document.body).on("keyup",".edd-select.chosen-container .chosen-search input, .edd-select.chosen-container .search-field input",function(lastKey){var val=$(this).val(),container=$(this).closest(".edd-select-chosen"),select=(container.attr("id").replace("\_chosen",""),container.prev()),no\_bundles=container.hasClass("no-bundles"),variations=container.hasClass("variations"),lastKey=lastKey.which,search\_type="edd\_download\_search";if(container.prev().data("search-type")){if("no\_ajax"==select.data("search-type"))return;search\_type="edd\_"+select.data("search-type")+"\_search"}val.length<=3&&"edd\_download\_search"==search\_type||16==lastKey||13==lastKey||91==lastKey||17==lastKey||37==lastKey||38==lastKey||39==lastKey||40==lastKey||(clearTimeout(typingTimer),typingTimer=setTimeout(function(){$.ajax({type:"GET",url:ajaxurl,data:{action:search\_type,s:val,no\_bundles:no\_bundles,variations:variations},dataType:"json",beforeSend:function(){select.closest("ul.chosen-results").empty()},success:function(data){$("option:not(:selected)",select).remove(),$.each(data,function(key,item){$('option\[value="'+item.id+'"\]',select).length||select.prepend('<option value="'+item.id+'">'+item.name+"</option>")}),$(".edd-select-chosen").trigger("chosen:updated"),select.next().find("input").val(val)}}).fail(function(response){window.console&&window.console.log&&console.log(response)}).done(function(response){})},342))}),$("#post").on("click",".edd-thickbox",function(){$(".edd-select-chosen","#choose-download").css("width","100%")}),{init:function(){this.revoke\_api\_key(),this.regenerate\_api\_key(),this.create\_api\_key(),this.recount\_stats()},revoke\_api\_key:function(){$(document.body).on("click",".edd-revoke-api-key",function(e){return confirm(edd\_vars.revoke\_api\_key)})},regenerate\_api\_key:function(){$(document.body).on("click",".edd-regenerate-api-key",function(e){return confirm(edd\_vars.regenerate\_api\_key)})},create\_api\_key:function(){$(document.body).on("submit","#api-key-generate-form",function(e){var input=$('input\[type="text"\]\[name="user\_id"\]');input.css("border-color","#ddd");var user\_id=input.val();if(user\_id.length<1||0==user\_id)return input.css("border-color","#ff0000"),!1})},recount\_stats:function(){$(document.body).on("change","#recount-stats-type",function(){var export\_form=$("#edd-tools-recount-form"),selected\_type=$("option:selected",this).data("type"),submit\_button=$("#recount-stats-submit"),products=$("#tools-product-dropdown");export\_form.find(".notice-wrap").remove(),submit\_button.removeClass("button-disabled").attr("disabled",!1),products.hide(),$(".edd-recount-stats-descriptions span").hide(),"recount-download"===selected\_type?(products.show(),products.find(".edd-select-chosen").css("width","auto")):"reset-stats"===selected\_type?(export\_form.append('<div class="notice-wrap"></div>'),export\_form.find(".notice-wrap").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>"),$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")):(products.hide(),products.val(0)),$("#"+selected\_type).show()}),$(document.body).on("change","#confirm-reset",function(){$(this).is(":checked")?$("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):$("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")}),$("#edd-tools-recount-form").submit(function(e){var selection=$("#recount-stats-type").val(),export\_form=$(this),selected\_type=$("option:selected",this).data("type");if("reset-stats"===selected\_type){if($("#confirm-reset").is(":checked"))return!0;has\_errors=!0}export\_form.find(".notice-wrap").remove(),export\_form.append('<div class="notice-wrap"></div>');var notice\_wrap=export\_form.find(".notice-wrap"),has\_errors=!1;if(null!==selection&&0!==selection||(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_class+"</p></div>"),has\_errors=!0),"recount-download"===selected\_type&&0==$('select\[name="download\_id"\]').val()&&(notice\_wrap.html('<div class="updated error"><p>'+edd\_vars.batch\_export\_no\_reqs+"</p></div>"),has\_errors=!0),has\_errors)return export\_form.find(".button-disabled").removeClass("button-disabled"),!1})}}.init(),{init:function(){this.submit(),this.dismiss\_message()},submit:function(){var self=this;$(document.body).on("submit",".edd-export-form",function(data){data.preventDefault();var submitButton=$(this).find('input\[type="submit"\]');submitButton.hasClass("button-disabled")||(data=$(this).serialize(),submitButton.addClass("button-disabled"),$(this).find(".notice-wrap").remove(),$(this).append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),self.process\_step(1,data,self))})},process\_step:function(step,data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:data,action:"edd\_do\_ajax\_export",step:step},dataType:"json",success:function(response){var export\_form,notice\_wrap,success\_message;"done"==response.step||response.error||response.success?(notice\_wrap=(export\_form=$(".edd-export-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),export\_form.find(".button-disabled").removeClass("button-disabled"),response.error?(success\_message=response.message,notice\_wrap.html('<div class="updated error"><p>'+success\_message+"</p></div>")):response.success?(success\_message=response.message,notice\_wrap.html('<div id="edd-batch-success" class="updated notice is-dismissible"><p>'+success\_message+'<span class="notice-dismiss"></span></p></div>')):(notice\_wrap.remove(),window.location=response.url)):($(".edd-progress div").animate({width:response.percentage+"%"},50,function(){}),self.process\_step(parseInt(response.step),data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})},dismiss\_message:function(){$(document.body).on("click","#edd-batch-success .notice-dismiss",function(){$("#edd-batch-success").parent().slideUp("fast")})}}.init();var EDD\_Import={init:function(){this.submit()},submit:function(){$(".edd-import-form").ajaxForm({beforeSubmit:this.before\_submit,success:this.success,complete:this.complete,dataType:"json",error:this.error})},before\_submit:function(arr,notice\_wrap,options){if(notice\_wrap.find(".notice-wrap").remove(),notice\_wrap.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 import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");return import\_form.find(".button-disabled").removeClass("button-disabled"),notice\_wrap.html('<div class="update error"><p>'+edd\_vars.unsupported\_browser+"</p></div>"),!1}},success:function(responseText,statusText,xhr,$form){},complete:function(xhr){var $form,select,options,columns,response=jQuery.parseJSON(xhr.responseText);response.success?(($form=$(".edd-import-form .notice-wrap").parent()).find(".edd-import-file-wrap,.notice-wrap").remove(),$form.find(".edd-import-options").slideDown(),(select=$form.find("select.edd-import-csv-column")).parents("tr").first(),options="",columns=response.data.columns.sort(function(a,b){return a<b?-1:b<a?1:0}),$.each(columns,function(key,value){options+='<option value="'+value+'">'+value+"</option>"}),select.append(options),select.on("change",function(){var $key=$(this).val();$key&&0!=response.data.first\_row\[$key\]?$(this).parent().next().html(response.data.first\_row\[$key\]):$(this).parent().next().html("")}),$.each(select,function(){$(this).val($(this).attr("data-field")).change()}),$(document.body).on("click",".edd-import-proceed",function(e){e.preventDefault(),$form.append('<div class="notice-wrap"><span class="spinner is-active"></span><div class="edd-progress"><div></div></div></div>'),response.data.mapping=$form.serialize(),EDD\_Import.process\_step(1,response.data,self)})):EDD\_Import.error(xhr)},error:function(notice\_wrap){var response=jQuery.parseJSON(notice\_wrap.responseText),import\_form=$(".edd-import-form").find(".edd-progress").parent().parent(),notice\_wrap=import\_form.find(".notice-wrap");import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):notice\_wrap.remove()},process\_step:function(step,import\_data,self){$.ajax({type:"POST",url:ajaxurl,data:{form:import\_data.form,nonce:import\_data.nonce,class:import\_data.class,upload:import\_data.upload,mapping:import\_data.mapping,action:"edd\_do\_ajax\_import",step:step},dataType:"json",success:function(response){var import\_form,notice\_wrap;"done"==response.data.step||response.data.error?(notice\_wrap=(import\_form=$(".edd-import-form").find(".edd-progress").parent().parent()).find(".notice-wrap"),import\_form.find(".button-disabled").removeClass("button-disabled"),response.data.error?notice\_wrap.html('<div class="update error"><p>'+response.data.error+"</p></div>"):(import\_form.find(".edd-import-options").hide(),$("html, body").animate({scrollTop:import\_form.parent().offset().top},500),notice\_wrap.html('<div class="updated"><p>'+response.data.message+"</p></div>"))):($(".edd-progress div").animate({width:response.data.percentage+"%"},50,function(){}),EDD\_Import.process\_step(parseInt(response.data.step),import\_data,self))}}).fail(function(response){window.console&&window.console.log&&console.log(response)})}};EDD\_Import.init();var EDD\_Customer={vars:{customer\_card\_wrap\_editable:$(".edd-customer-card-wrapper .editable"),customer\_card\_wrap\_edit\_item:$(".edd-customer-card-wrapper .edit-item"),user\_id:$('input\[name="customerinfo\[user\_id\]"\]'),state\_input:$(':input\[name="customerinfo\[state\]"\]'),note:$("#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(){$(document.body).on("click","#edit-customer",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_editable.hide(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.fadeIn().css("display","block")})},add\_email:function(){$(document.body).on("click","#add-customer-email",function(nonce){nonce.preventDefault();var button=$(this),wrapper=button.parent();wrapper.parent().find(".notice-container").remove(),wrapper.find(".spinner").css("visibility","visible"),button.attr("disabled",!0);var customer\_id=wrapper.find('input\[name="customer-id"\]').val(),email=wrapper.find('input\[name="additional-email"\]').val(),primary=wrapper.find('input\[name="make-additional-primary"\]').is(":checked"),nonce=wrapper.find('input\[name="add\_email\_nonce"\]').val();$.post(ajaxurl,{edd\_action:"customer-add-email",customer\_id:customer\_id,email:email,primary:primary,\_wpnonce:nonce},function(response){!0===response.success?window.location.href=response.redirect:(button.attr("disabled",!1),wrapper.after('<div class="notice-container"><div class="notice notice-error inline"><p>'+response.message+"</p></div></div>"),wrapper.find(".spinner").css("visibility","hidden"))},"json")})},user\_search:function(){$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results a",function(user\_id){user\_id.preventDefault();user\_id=$(this).data("userid");EDD\_Customer.vars.user\_id.val(user\_id)})},remove\_user:function(){$(document.body).on("click","#disconnect-customer",function(postData){postData.preventDefault(),confirm(edd\_vars.disconnect\_customer)&&(postData={edd\_action:"disconnect-userid",customer\_id:$('input\[name="customerinfo\[id\]"\]').val(),\_wpnonce:$("#edit-customer-info #\_wpnonce").val()},$.post(ajaxurl,postData,function(response){window.location.href=window.location.href},"json"))})},cancel\_edit:function(){$(document.body).on("click","#edd-edit-customer-cancel",function(e){e.preventDefault(),EDD\_Customer.vars.customer\_card\_wrap\_edit\_item.hide(),EDD\_Customer.vars.customer\_card\_wrap\_editable.show(),$(".edd\_user\_search\_results").html("")})},change\_country:function(){$('select\[name="customerinfo\[country\]"\]').change(function(){var $this=$(this),data={action:"edd\_get\_shop\_states",country:$this.val(),nonce:$this.data("nonce"),field\_name:"customerinfo\[state\]"};return $.post(ajaxurl,data,function(response){"nostates"==response?EDD\_Customer.vars.state\_input.replaceWith('<input type="text" name="'+data.field\_name+'" value="" class="edd-edit-toggles medium-text"/>'):EDD\_Customer.vars.state\_input.replaceWith(response)}),!1})},add\_note:function(){$(document.body).on("click","#add-customer-note",function(postData){postData.preventDefault();var border\_color,postData={edd\_action:"add-customer-note",customer\_id:$("#customer-id").val(),customer\_note:EDD\_Customer.vars.note.val(),add\_customer\_note\_nonce:$("#add\_customer\_note\_nonce").val()};postData.customer\_note?$.ajax({type:"POST",data:postData,url:ajaxurl,success:function(response){$("#edd-customer-notes").prepend(response),$(".edd-no-customer-notes").hide(),EDD\_Customer.vars.note.val("")}}).fail(function(data){window.console&&window.console.log&&console.log(data)}):(border\_color=EDD\_Customer.vars.note.css("border-color"),EDD\_Customer.vars.note.css("border-color","red"),setTimeout(function(){EDD\_Customer.vars.note.css("border-color",border\_color)},500))})},delete\_checked:function(){$("#edd-customer-delete-confirm").change(function(){var records\_input=$("#edd-customer-delete-records"),submit\_button=$("#edd-delete-customer");$(this).prop("checked")?(records\_input.attr("disabled",!1),submit\_button.attr("disabled",!1)):(records\_input.attr("disabled",!0),records\_input.prop("checked",!1),submit\_button.attr("disabled",!0))})}};EDD\_Customer.init();var EDD\_Promo\_Notices={init:function(){EDD\_Promo\_Notices.displayNotices(),EDD\_Promo\_Notices.dismissNotices()},displayNotices:function(){var topOfPageNoticeEl,topOfPageNotice=$(".edd-admin-notice-top-of-page");topOfPageNotice&&(topOfPageNoticeEl=topOfPageNotice.detach(),$("#wpbody-content").prepend(topOfPageNoticeEl),topOfPageNotice.delay(1e3).slideDown())},dismissNotices:function(){$(".edd-promo-notice").each(function(){var notice=$(this);notice.on("click",".edd-promo-notice-dismiss",function(e){$(this).attr("href")||e.preventDefault(),$.ajax({type:"POST",data:{action:"edd\_dismiss\_promo\_notice",notice\_id:notice.data("id"),nonce:notice.data("nonce"),lifespan:notice.data("lifespan")},url:ajaxurl,success:function(response){notice.slideUp()}})})})}};EDD\_Promo\_Notices.init(),$(".edd-ajax-user-search").keyup(function(){var user\_search=$(this).val(),data="";$(this).data("exclude")&&(data=$(this).data("exclude")),$(".edd-ajax").show();data={action:"edd\_search\_users",user\_name:user\_search,exclude:data};document.body.style.cursor="wait",$.ajax({type:"POST",data:data,dataType:"json",url:ajaxurl,success:function(search\_response){$(".edd-ajax").hide(),$(".edd\_user\_search\_results").removeClass("hidden"),$(".edd\_user\_search\_results span").html(""),$(search\_response.results).appendTo(".edd\_user\_search\_results span"),document.body.style.cursor="default"}})}),$(document.body).on("click.eddSelectUser",".edd\_user\_search\_results span a",function(login){login.preventDefault();login=$(this).data("login");$(".edd-ajax-user-search").val(login),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$(document.body).on("click.eddCancelUserSearch",".edd\_user\_search\_results a.edd-ajax-user-cancel",function(e){e.preventDefault(),$(".edd-ajax-user-search").val(""),$(".edd\_user\_search\_results").addClass("hidden"),$(".edd\_user\_search\_results span").html("")}),$("#edd\_dashboard\_sales").length&&$.ajax({type:"GET",data:{action:"edd\_load\_dashboard\_widget"},url:ajaxurl,success:function(response){$("#edd\_dashboard\_sales .edd-loading").html(response)}}),$(document.body).on("keydown",".customer-note-input",function(e){13==e.keyCode&&(e.metaKey||e.ctrlKey)&&$("#add-customer-note").click()}),$(document.body).on("click","#edd-disable-debug-log",function(e){e.preventDefault(),$(this).attr("disabled",!0);var notice=$("#edd-debug-log-notice");$.ajax({type:"GET",data:{action:"edd\_disable\_debugging",nonce:$("#edd\_debug\_log\_delete").val()},url:ajaxurl,success:function(response){notice.empty().append(response.data),setTimeout(function(){notice.slideUp()},3e3)}}).fail(function(response){notice.empty().append(response.responseJSON.data)})})});var eddFormatCurrency=function(decimalPlaces){var numeric=parseFloat(decimalPlaces),storeCurrency=edd\_vars.currency,decimalPlaces=edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"currency",currency:storeCurrency,minimumFractionDigits:decimalPlaces,maximumFractionDigits:decimalPlaces})},eddFormatNumber=function(storeCurrency){var numeric=parseFloat(storeCurrency),storeCurrency=edd\_vars.currency;edd\_vars.currency\_decimals;return numeric.toLocaleString(storeCurrency,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})},eddLabelFormatter=function(label,series){return'<div style="font-size:12px; text-align:center; padding:2px">'+label+"</div>"},eddLegendFormatterSales=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatNumber(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item},eddLegendFormatterEarnings=function(item,series){var slug=item.toLowerCase().replace(/\\s/g,"-"),color='<div class="edd-legend-color" style="background-color: '+series.color+'"></div>',item='<div class="edd-pie-legend-item">'+item+": "+Math.round(series.percent)+"% ("+eddFormatCurrency(series.data\[0\]\[1\])+")</div>",item='<div id="'+series.edd\_vars.id+slug+'" class="edd-legend-item-wrapper">'+color+item+"</div>";return jQuery("#edd-pie-legend-"+series.edd\_vars.id).append(item),item};function edd\_attach\_tooltips(selector){selector.tooltip({content:function(){return jQuery(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})}function easy\_digital\_downloads\_recapture\_remote\_install(){jQuery.post(ajaxurl,{action:"edd\_recapture\_remote\_install"},function(response){0==response.success&&confirm(response.data.error)?location.reload():window.location.href="https://recapture.io/register"})}
easy-digital-downloads/trunk/assets/js/paypal-checkout.js
r2622712
r2697388
163
163
var nonces = responseData.data.nonces;
164
164
Object.keys( nonces ).forEach( function ( key ) {
165
document.getElementById( 'edd-gateway-' + key ).setAttribute( 'data-' + key + '-nonce', nonces\[ key \] );
165
var gatewaySelector = document.getElementById( 'edd-gateway-' + key );
166
if ( gatewaySelector ) {
167
gatewaySelector.setAttribute( 'data-' + key + '-nonce', nonces\[ key \] );
168
}
166
169
} );
167
170
}
easy-digital-downloads/trunk/assets/js/paypal-checkout.min.js
r2622712
r2697388
1
var EDD\_PayPal={isMounted:!1,init:function(){document.getElementById("edd-paypal-container")&&this.initButtons("#edd-paypal-container","checkout"),jQuery(document.body).on("edd\_discount\_applied",this.maybeRefreshPage),jQuery(document.body).on("edd\_discount\_removed",this.maybeRefreshPage)},isPayPal:function(){var chosenGateway=!1;return"paypal\_commerce"===(chosenGateway=!(chosenGateway=jQuery("select#edd-gateway, input.edd-gateway").length?jQuery("meta\[name='edd-chosen-gateway'\]").attr("content"):chosenGateway)&&edd\_scripts.default\_gateway?edd\_scripts.default\_gateway:chosenGateway)},maybeRefreshPage:function(e,data){(0===data.total\_plain&&EDD\_PayPal.isPayPal()||!EDD\_PayPal.isMounted&&EDD\_PayPal.isPayPal()&&0<data.total\_plain)&&window.location.reload()},setErrorHtml:function(form,context,errorHtml){var errorWrapper;"checkout"===context&&"undefined"!=typeof edd\_global\_vars&&edd\_global\_vars.checkout\_error\_anchor?(errorWrapper=document.getElementById("edd-paypal-errors-wrap"))&&(errorWrapper.innerHTML=errorHtml):"buy\_now"!==context||(errorWrapper=!!(form=form.closest(".edd\_download\_purchase\_form"))&&form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"))&&(errorWrapper.innerHTML=errorHtml),jQuery(document.body).trigger("edd\_checkout\_error",\[errorHtml\])},initButtons:function(container,context){EDD\_PayPal.isMounted=!0,paypal.Buttons(EDD\_PayPal.getButtonArgs(container,context)).render(container),document.dispatchEvent(new CustomEvent("edd\_paypal\_buttons\_mounted"))},getButtonArgs:function(container,context){var form="checkout"===context?document.getElementById("edd\_purchase\_form"):container.closest(".edd\_download\_purchase\_form"),errorWrapper="checkout"===context?form.querySelector("#edd-paypal-errors-wrap"):form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"),spinner="checkout"===context?document.getElementById("edd-paypal-spinner"):form.querySelector(".edd-paypal-spinner"),nonceEl=form.querySelector('input\[name="edd\_process\_paypal\_nonce"\]'),tokenEl=form.querySelector('input\[name="edd-process-paypal-token"\]'),createFunc="subscription"===eddPayPalVars.intent?"createSubscription":"createOrder",buttonArgs={onApprove:function(data,actions){var formData=new FormData;return formData.append("action",eddPayPalVars.approvalAction),formData.append("edd\_process\_paypal\_nonce",nonceEl.value),formData.append("token",tokenEl.getAttribute("data-token")),formData.append("timestamp",tokenEl.getAttribute("data-timestamp")),data.orderID&&formData.append("paypal\_order\_id",data.orderID),data.subscriptionID&&formData.append("paypal\_subscription\_id",data.subscriptionID),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){if(responseData.success&&responseData.data.redirect\_url)window.location=responseData.data.redirect\_url;else{spinner.style.display="none";var errorHtml=responseData.data.message||eddPayPalVars.defaultError;if(EDD\_PayPal.setErrorHtml(container,context,errorHtml),responseData.data.retry)return actions.restart()}})},onError:function(error){spinner.style.display="none",error.name="",EDD\_PayPal.setErrorHtml(container,context,error)},onCancel:function(data){spinner.style.display="none";var formData=new FormData;return formData.append("action","edd\_cancel\_paypal\_order"),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){var nonces;responseData.success&&(nonces=responseData.data.nonces,Object.keys(nonces).forEach(function(key){document.getElementById("edd-gateway-"+key).setAttribute("data-"+key+"-nonce",nonces\[key\])}))})}};return eddPayPalVars.style&&(buttonArgs.style=eddPayPalVars.style),buttonArgs\[createFunc\]=function(data,actions){return spinner.style.display="block",errorWrapper&&(errorWrapper.innerHTML=""),fetch(edd\_scripts.ajaxurl,{method:"POST",body:new FormData(form)}).then(function(response){return response.json()}).then(function(orderData){if(orderData.data&&orderData.data.paypal\_order\_id)return orderData.data.nonce&&(nonceEl.value=orderData.data.nonce),orderData.data.token&&(jQuery(tokenEl).attr("data-token",orderData.data.token),jQuery(tokenEl).attr("data-timestamp",orderData.data.timestamp)),orderData.data.paypal\_order\_id;var errorHtml=eddPayPalVars.defaultError;return orderData.data&&"string"==typeof orderData.data?errorHtml=orderData.data:"string"==typeof orderData&&(errorHtml=orderData),new Promise(function(resolve,reject){reject(errorHtml)})})},buttonArgs}};jQuery(document.body).on("edd\_gateway\_loaded",function(e,gateway){"paypal\_commerce"===gateway&&EDD\_PayPal.init()}),jQuery(document).ready(function($){for(var buyButtons=document.querySelectorAll(".edd-paypal-checkout-buy-now"),i=0;i<buyButtons.length;i++){var wrapper,spinnerWrap=buyButtons\[i\];spinnerWrap.classList.contains("edd-free-download")||(wrapper=spinnerWrap.closest(".edd\_purchase\_submit\_wrapper"))&&(wrapper.innerHTML="",(spinnerWrap=document.createElement("div")).classList.add("edd-paypal-checkout-buy-now-error-wrapper"),wrapper.before(spinnerWrap),(spinnerWrap=document.createElement("span")).classList.add("edd-paypal-spinner","edd-loading-ajax","edd-loading"),spinnerWrap.style.display="none",wrapper.after(spinnerWrap),EDD\_PayPal.initButtons(wrapper,"buy\_now"))}});
1
var EDD\_PayPal={isMounted:!1,init:function(){document.getElementById("edd-paypal-container")&&this.initButtons("#edd-paypal-container","checkout"),jQuery(document.body).on("edd\_discount\_applied",this.maybeRefreshPage),jQuery(document.body).on("edd\_discount\_removed",this.maybeRefreshPage)},isPayPal:function(){var chosenGateway=!1;return"paypal\_commerce"===(chosenGateway=!(chosenGateway=jQuery("select#edd-gateway, input.edd-gateway").length?jQuery("meta\[name='edd-chosen-gateway'\]").attr("content"):chosenGateway)&&edd\_scripts.default\_gateway?edd\_scripts.default\_gateway:chosenGateway)},maybeRefreshPage:function(e,data){(0===data.total\_plain&&EDD\_PayPal.isPayPal()||!EDD\_PayPal.isMounted&&EDD\_PayPal.isPayPal()&&0<data.total\_plain)&&window.location.reload()},setErrorHtml:function(form,context,errorHtml){var errorWrapper;"checkout"===context&&"undefined"!=typeof edd\_global\_vars&&edd\_global\_vars.checkout\_error\_anchor?(errorWrapper=document.getElementById("edd-paypal-errors-wrap"))&&(errorWrapper.innerHTML=errorHtml):"buy\_now"!==context||(errorWrapper=!!(form=form.closest(".edd\_download\_purchase\_form"))&&form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"))&&(errorWrapper.innerHTML=errorHtml),jQuery(document.body).trigger("edd\_checkout\_error",\[errorHtml\])},initButtons:function(container,context){EDD\_PayPal.isMounted=!0,paypal.Buttons(EDD\_PayPal.getButtonArgs(container,context)).render(container),document.dispatchEvent(new CustomEvent("edd\_paypal\_buttons\_mounted"))},getButtonArgs:function(container,context){var form="checkout"===context?document.getElementById("edd\_purchase\_form"):container.closest(".edd\_download\_purchase\_form"),errorWrapper="checkout"===context?form.querySelector("#edd-paypal-errors-wrap"):form.querySelector(".edd-paypal-checkout-buy-now-error-wrapper"),spinner="checkout"===context?document.getElementById("edd-paypal-spinner"):form.querySelector(".edd-paypal-spinner"),nonceEl=form.querySelector('input\[name="edd\_process\_paypal\_nonce"\]'),tokenEl=form.querySelector('input\[name="edd-process-paypal-token"\]'),createFunc="subscription"===eddPayPalVars.intent?"createSubscription":"createOrder",buttonArgs={onApprove:function(data,actions){var formData=new FormData;return formData.append("action",eddPayPalVars.approvalAction),formData.append("edd\_process\_paypal\_nonce",nonceEl.value),formData.append("token",tokenEl.getAttribute("data-token")),formData.append("timestamp",tokenEl.getAttribute("data-timestamp")),data.orderID&&formData.append("paypal\_order\_id",data.orderID),data.subscriptionID&&formData.append("paypal\_subscription\_id",data.subscriptionID),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){if(responseData.success&&responseData.data.redirect\_url)window.location=responseData.data.redirect\_url;else{spinner.style.display="none";var errorHtml=responseData.data.message||eddPayPalVars.defaultError;if(EDD\_PayPal.setErrorHtml(container,context,errorHtml),responseData.data.retry)return actions.restart()}})},onError:function(error){spinner.style.display="none",error.name="",EDD\_PayPal.setErrorHtml(container,context,error)},onCancel:function(data){spinner.style.display="none";var formData=new FormData;return formData.append("action","edd\_cancel\_paypal\_order"),fetch(edd\_scripts.ajaxurl,{method:"POST",body:formData}).then(function(response){return response.json()}).then(function(responseData){var nonces;responseData.success&&(nonces=responseData.data.nonces,Object.keys(nonces).forEach(function(key){var gatewaySelector=document.getElementById("edd-gateway-"+key);gatewaySelector&&gatewaySelector.setAttribute("data-"+key+"-nonce",nonces\[key\])}))})}};return eddPayPalVars.style&&(buttonArgs.style=eddPayPalVars.style),buttonArgs\[createFunc\]=function(data,actions){return spinner.style.display="block",errorWrapper&&(errorWrapper.innerHTML=""),fetch(edd\_scripts.ajaxurl,{method:"POST",body:new FormData(form)}).then(function(response){return response.json()}).then(function(orderData){if(orderData.data&&orderData.data.paypal\_order\_id)return orderData.data.nonce&&(nonceEl.value=orderData.data.nonce),orderData.data.token&&(jQuery(tokenEl).attr("data-token",orderData.data.token),jQuery(tokenEl).attr("data-timestamp",orderData.data.timestamp)),orderData.data.paypal\_order\_id;var errorHtml=eddPayPalVars.defaultError;return orderData.data&&"string"==typeof orderData.data?errorHtml=orderData.data:"string"==typeof orderData&&(errorHtml=orderData),new Promise(function(resolve,reject){reject(errorHtml)})})},buttonArgs}};jQuery(document.body).on("edd\_gateway\_loaded",function(e,gateway){"paypal\_commerce"===gateway&&EDD\_PayPal.init()}),jQuery(document).ready(function($){for(var buyButtons=document.querySelectorAll(".edd-paypal-checkout-buy-now"),i=0;i<buyButtons.length;i++){var wrapper,spinnerWrap=buyButtons\[i\];spinnerWrap.classList.contains("edd-free-download")||(wrapper=spinnerWrap.closest(".edd\_purchase\_submit\_wrapper"))&&(wrapper.innerHTML="",(spinnerWrap=document.createElement("div")).classList.add("edd-paypal-checkout-buy-now-error-wrapper"),wrapper.before(spinnerWrap),(spinnerWrap=document.createElement("span")).classList.add("edd-paypal-spinner","edd-loading-ajax","edd-loading"),spinnerWrap.style.display="none",wrapper.after(spinnerWrap),EDD\_PayPal.initButtons(wrapper,"buy\_now"))}});
easy-digital-downloads/trunk/easy-digital-downloads.php
r2667063
r2697388
6
6
\* Author: Easy Digital Downloads
7
7
\* Author URI: https://easydigitaldownloads.com
8
\* Version: 2.11.5
8
\* Version: 2.11.6
9
9
\* Text Domain: easy-digital-downloads
10
10
\* Domain Path: languages
…
…
26
26
\* @category Core
27
27
\* @author Easy Digital Downloads
28
\* @version 2.11.5
28
\* @version 2.11.6
29
29
\*/
30
30
…
…
232
232
// Plugin version.
233
233
if ( ! defined( 'EDD\_VERSION' ) ) {
234
define( 'EDD\_VERSION', '2.11.5' );
234
define( 'EDD\_VERSION', '2.11.6' );
235
235
}
236
236
easy-digital-downloads/trunk/includes/admin/customers/customers.php
r1908451
r2697388
616
616
<input type="hidden" name="edd\_action" value="add-customer-note" />
617
617
<?php wp\_nonce\_field( 'add-customer-note', 'add\_customer\_note\_nonce', true, true ); ?>
618
<input id="add-customer-note" class="right button-primary" type="submit" value="Add Note" />
618
<input id="add-customer-note" class="right button-primary" type="submit" value="<?php esc\_attr\_e( 'Add Note', 'easy-digital-downloads' ); ?>" />
619
619
</form>
620
620
</div>
easy-digital-downloads/trunk/includes/admin/extensions/product-education/class-email-marketing.php
r2667063
r2697388
73
73
$configuration\['title'\] = sprintf( \_\_( 'Get %s Today!', 'easy-digital-downloads' ), $product\_data->title );
74
74
}
75
if ( 'mailchimp' === $product\_data->slug && ! ( defined( 'EDD\_MAILCHIMP\_VERSION' ) && version\_compare( EDD\_MAILCHIMP\_VERSION, '3.0.16', '>=' ) ) ) {
76
$configuration\['tab'\] = 'extensions';
77
}
78
75
79
76
return $configuration;
easy-digital-downloads/trunk/includes/admin/payments/actions.php
r1906675
r2697388
327
327
328
328
function edd\_ajax\_store\_payment\_note() {
329
$nonce = sanitize\_text\_field( $\_POST\['nonce'\] );
330
if ( ! wp\_verify\_nonce( $nonce, 'edd\_add\_payment\_note' ) ) {
331
wp\_die( \_\_( 'Nonce verification failed', 'easy-digital-downloads' ), \_\_( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
332
}
329
333
330
334
$payment\_id = absint( $\_POST\['payment\_id'\] );
…
…
335
339
}
336
340
337
if( empty( $payment\_id ) )
341
if ( empty( $payment\_id ) ) {
338
342
die( '-1' );
339
340
if( empty( $note ) )
343
}
344
345
if ( empty( $note ) ) {
341
346
die( '-1' );
347
}
342
348
343
349
$note\_id = edd\_insert\_payment\_note( $payment\_id, $note );
easy-digital-downloads/trunk/includes/admin/payments/view-order-details.php
r2082925
r2697388
830
830
831
831
<p>
832
<button id="edd-add-payment-note" class="button button-secondary right" data-payment-id="<?php echo absint( $payment\_id ); ?>"\><?php \_e( 'Add Note', 'easy-digital-downloads' ); ?></button>
832
<button id="edd-add-payment-note" class="button button-secondary right" data-payment-id="<?php echo absint( $payment\_id ); ?>" data-nonce="<?php echo wp\_create\_nonce( 'edd\_add\_payment\_note' ); ?>"\><?php \_e( 'Add Note', 'easy-digital-downloads' ); ?></button>
833
833
</p>
834
834
easy-digital-downloads/trunk/includes/admin/promos/notices/class-license-upgrade-notice.php
r2649624
r2697388
95
95
$this->pass\_manager->has\_pass() &&
96
96
Pass\_Manager::pass\_compare( $this->pass\_manager->highest\_pass\_id, Pass\_Manager::EXTENDED\_PASS\_ID, '>=' ) &&
97
$this->has\_affiliate\_wp\_license()
97
$this->has\_affiliate\_wp\_license() &&
98
$this->has\_mi\_license()
98
99
) {
99
100
return false;
…
…
119
120
120
121
return (bool) affiliate\_wp()->settings->get( 'license\_key' );
122
}
123
124
/\*\*
125
\* Determines whether or not MonsterInsights is installed and has a license key.
126
\*
127
\* @since 2.11.6
128
\*
129
\* @return bool
130
\*/
131
private function has\_mi\_license() {
132
if ( ! class\_exists( 'MonsterInsights' ) ) {
133
return false;
134
}
135
136
$mi\_license = \\MonsterInsights::$instance->license->get\_license\_key();
137
return ! empty( $mi\_license );
121
138
}
122
139
…
…
149
166
printf(
150
167
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
151
\_\_( 'You are using the free version of Easy Digital Downloads. %1$sPurchase a pass%2$s to get email marketing tools and recurring payments.', 'easy-digital-downloads' ),
168
\_\_( 'You are using the free version of Easy Digital Downloads. %1$sPurchase a pass%2$s to get email marketing tools and recurring payments. %3$sAlready have a Pass?%4$s', 'easy-digital-downloads' ),
152
169
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'core', $source ), 'https://easydigitaldownloads.com/pricing/' ) ) . '" target="\_blank">',
170
'</a>',
171
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'core', $source ), 'https://easydigitaldownloads.com/what-is-an-edd-pass' ) ) . '" target="\_blank">',
153
172
'</a>'
154
173
);
…
…
176
195
} elseif ( Pass\_Manager::pass\_compare( $this->pass\_manager->highest\_pass\_id, Pass\_Manager::EXTENDED\_PASS\_ID, '>=' ) ) {
177
196
197
if ( ! $this->has\_affiliate\_wp\_license() ) {
178
198
// Extended pass or higher.
179
printf(
180
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
181
\_\_( 'Grow your business and make more money with affiliate marketing. %1$sGet AffiliateWP%2$s', 'easy-digital-downloads' ),
182
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'extended-pass', $source ), 'https://affiliatewp.com/?ref=743' ) ) . '" target="\_blank">',
183
'</a>'
184
);
199
printf(
200
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
201
\_\_( 'Grow your business and make more money with affiliate marketing. %1$sGet AffiliateWP%2$s', 'easy-digital-downloads' ),
202
'<a href="' . esc\_url( add\_query\_arg( $this->query\_args( 'extended-pass', $source ), 'https://affiliatewp.com/?ref=743' ) ) . '" target="\_blank">',
203
'</a>'
204
);
205
} elseif( ! $this->has\_mi\_license() ) {
206
printf(
207
/\* Translators: %1$s opening anchor tag; %2$s closing anchor tag \*/
208
\_\_( 'Gain access to powerful insights to grow your traffic and revenue. %1$sGet MonsterInsights%2$s', 'easy-digital-downloads' ),
209
'<a href="' . esc\_url( 'https://monsterinsights.com?utm\_campaign=xsell&utm\_source=eddplugin&utm\_content=top-promo' ) . '" target="\_blank">',
210
'</a>'
211
);
212
}
185
213
}
186
214
} catch ( \\Exception $e ) {
easy-digital-downloads/trunk/includes/admin/reporting/class-file-downloads-logs-list-table.php
r2104403
r2697388
136
136
case 'ip':
137
137
return '<a href="' . esc\_url( 'https://ipinfo.io/' . $item\['ip'\] ) . '" target="\_blank" rel="noopener noreferrer">' . esc\_html( $item\['ip'\] ) . '</a>';
138
case 'file':
139
return esc\_html( $item\['file'\] );
138
140
default:
139
141
return $item\[ $column\_name \];
…
…
380
382
$file\_id = apply\_filters( 'edd\_log\_file\_download\_file\_id', $file\_id, $log );
381
383
382
$file\_name = isset( $files\[ $file\_id \]\['name'\] ) ? $files\[ $file\_id \]\['name'\] : null;
384
$file\_name = ! empty( $files\[ $file\_id \]\['name'\] ) ? $files\[ $file\_id \]\['name'\] : edd\_get\_file\_name( $files\[ $file\_id \] );
383
385
384
386
if ( ( $this->file\_search && strpos( strtolower( $file\_name ), strtolower( $this->get\_search() ) ) !== false ) || ! $this->file\_search ) {
easy-digital-downloads/trunk/includes/class-edd-register-meta.php
r2182533
r2697388
518
518
519
519
if( ! empty( $files\[ $id \]\['name'\] ) ) {
520
$files\[ $id \]\['name'\] = trim( $file\['name'\] );
520
$files\[ $id \]\['name'\] = sanitize\_text\_field( $file\['name'\] );
521
521
}
522
522
}
easy-digital-downloads/trunk/includes/gateways/paypal-standard.php
r2649624
r2697388
556
556
557
557
// Collect payment details
558
$purchase\_key = isset( $data\['invoice'\] ) ? $data\['invoice'\] : $data\['item\_number'\];
558
$purchase\_key = isset( $data\['invoice'\] ) ? $data\['invoice'\] : false;
559
if ( ! $purchase\_key && ! empty( $data\['item\_number'\] ) ) {
560
$purchase\_key = $data\['item\_number'\];
561
}
559
562
$paypal\_amount = $data\['mc\_gross'\];
560
563
$payment\_status = strtolower( $data\['payment\_status'\] );
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/ClassLoader.php
r2667063
r2697388
38
38
\* @author Fabien Potencier <[email protected]>
39
39
\* @author Jordi Boggiano <[email protected]>
40
\* @see https://www.php-fig.org/psr/psr-0/
41
\* @see https://www.php-fig.org/psr/psr-4/
40
\* @see http://www.php-fig.org/psr/psr-0/
41
\* @see http://www.php-fig.org/psr/psr-4/
42
42
\*/
43
43
class ClassLoader
44
44
{
45
/\*\* @var ?string \*/
46
private $vendorDir;
47
48
45
// PSR-4
49
/\*\*
50
\* @var array\[\]
51
\* @psalm-var array<string, array<string, int>>
52
\*/
53
46
private $prefixLengthsPsr4 = array();
54
/\*\*
55
\* @var array\[\]
56
\* @psalm-var array<string, array<int, string>>
57
\*/
58
47
private $prefixDirsPsr4 = array();
59
/\*\*
60
\* @var array\[\]
61
\* @psalm-var array<string, string>
62
\*/
63
48
private $fallbackDirsPsr4 = array();
64
49
65
50
// PSR-0
66
/\*\*
67
\* @var array\[\]
68
\* @psalm-var array<string, array<string, string\[\]>>
69
\*/
70
51
private $prefixesPsr0 = array();
71
/\*\*
72
\* @var array\[\]
73
\* @psalm-var array<string, string>
74
\*/
75
52
private $fallbackDirsPsr0 = array();
76
53
77
/\*\* @var bool \*/
78
54
private $useIncludePath = false;
79
80
/\*\*
81
\* @var string\[\]
82
\* @psalm-var array<string, string>
83
\*/
84
55
private $classMap = array();
85
86
/\*\* @var bool \*/
87
56
private $classMapAuthoritative = false;
88
89
/\*\*
90
\* @var bool\[\]
91
\* @psalm-var array<string, bool>
92
\*/
93
57
private $missingClasses = array();
94
95
/\*\* @var ?string \*/
96
58
private $apcuPrefix;
97
59
98
/\*\*
99
\* @var self\[\]
100
\*/
101
private static $registeredLoaders = array();
102
103
/\*\*
104
\* @param ?string $vendorDir
105
\*/
106
public function \_\_construct($vendorDir = null)
107
{
108
$this->vendorDir = $vendorDir;
109
}
110
111
/\*\*
112
\* @return string\[\]
113
\*/
114
60
public function getPrefixes()
115
61
{
116
62
if (!empty($this->prefixesPsr0)) {
117
return call\_user\_func\_array('array\_merge', array\_values($this->prefixesPsr0));
63
return call\_user\_func\_array('array\_merge', $this->prefixesPsr0);
118
64
}
119
65
…
…
121
67
}
122
68
123
/\*\*
124
\* @return array\[\]
125
\* @psalm-return array<string, array<int, string>>
126
\*/
127
69
public function getPrefixesPsr4()
128
70
{
…
…
130
72
}
131
73
132
/\*\*
133
\* @return array\[\]
134
\* @psalm-return array<string, string>
135
\*/
136
74
public function getFallbackDirs()
137
75
{
…
…
139
77
}
140
78
141
/\*\*
142
\* @return array\[\]
143
\* @psalm-return array<string, string>
144
\*/
145
79
public function getFallbackDirsPsr4()
146
80
{
…
…
148
82
}
149
83
150
/\*\*
151
\* @return string\[\] Array of classname => path
152
\* @psalm-var array<string, string>
153
\*/
154
84
public function getClassMap()
155
85
{
…
…
158
88
159
89
/\*\*
160
\* @param string\[\] $classMap Class to filename map
161
\* @psalm-param array<string, string> $classMap
162
\*
163
\* @return void
90
\* @param array $classMap Class to filename map
164
91
\*/
165
92
public function addClassMap(array $classMap)
…
…
176
103
\* appending or prepending to the ones previously set for this prefix.
177
104
\*
178
\* @param string $prefix The prefix
179
\* @param string\[\]|string $paths The PSR-0 root directories
180
\* @param bool $prepend Whether to prepend the directories
181
\*
182
\* @return void
105
\* @param string $prefix The prefix
106
\* @param array|string $paths The PSR-0 root directories
107
\* @param bool $prepend Whether to prepend the directories
183
108
\*/
184
109
public function add($prefix, $paths, $prepend = false)
…
…
223
148
\* appending or prepending to the ones previously set for this namespace.
224
149
\*
225
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
226
\* @param string\[\]|string $paths The PSR-4 base directories
227
\* @param bool $prepend Whether to prepend the directories
150
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
151
\* @param array|string $paths The PSR-4 base directories
152
\* @param bool $prepend Whether to prepend the directories
228
153
\*
229
154
\* @throws \\InvalidArgumentException
230
\*
231
\* @return void
232
155
\*/
233
156
public function addPsr4($prefix, $paths, $prepend = false)
…
…
273
196
\* replacing any others previously set for this prefix.
274
197
\*
275
\* @param string $prefix The prefix
276
\* @param string\[\]|string $paths The PSR-0 base directories
277
\*
278
\* @return void
198
\* @param string $prefix The prefix
199
\* @param array|string $paths The PSR-0 base directories
279
200
\*/
280
201
public function set($prefix, $paths)
…
…
291
212
\* replacing any others previously set for this namespace.
292
213
\*
293
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
294
\* @param string\[\]|string $paths The PSR-4 base directories
214
\* @param string $prefix The prefix/namespace, with trailing '\\\\'
215
\* @param array|string $paths The PSR-4 base directories
295
216
\*
296
217
\* @throws \\InvalidArgumentException
297
\*
298
\* @return void
299
218
\*/
300
219
public function setPsr4($prefix, $paths)
…
…
316
235
\*
317
236
\* @param bool $useIncludePath
318
\*
319
\* @return void
320
237
\*/
321
238
public function setUseIncludePath($useIncludePath)
…
…
340
257
\*
341
258
\* @param bool $classMapAuthoritative
342
\*
343
\* @return void
344
259
\*/
345
260
public function setClassMapAuthoritative($classMapAuthoritative)
…
…
362
277
\*
363
278
\* @param string|null $apcuPrefix
364
\*
365
\* @return void
366
279
\*/
367
280
public function setApcuPrefix($apcuPrefix)
…
…
384
297
\*
385
298
\* @param bool $prepend Whether to prepend the autoloader or not
386
\*
387
\* @return void
388
299
\*/
389
300
public function register($prepend = false)
390
301
{
391
302
spl\_autoload\_register(array($this, 'loadClass'), true, $prepend);
392
393
if (null === $this->vendorDir) {
394
return;
395
}
396
397
if ($prepend) {
398
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
399
} else {
400
unset(self::$registeredLoaders\[$this->vendorDir\]);
401
self::$registeredLoaders\[$this->vendorDir\] = $this;
402
}
403
303
}
404
304
405
305
/\*\*
406
306
\* Unregisters this instance as an autoloader.
407
\*
408
\* @return void
409
307
\*/
410
308
public function unregister()
411
309
{
412
310
spl\_autoload\_unregister(array($this, 'loadClass'));
413
414
if (null !== $this->vendorDir) {
415
unset(self::$registeredLoaders\[$this->vendorDir\]);
416
}
417
311
}
418
312
…
…
421
315
\*
422
316
\* @param string $class The name of the class
423
\* @return true|null True if loaded, null otherwise
317
\* @return bool|null True if loaded, null otherwise
424
318
\*/
425
319
public function loadClass($class)
…
…
430
324
return true;
431
325
}
432
433
return null;
434
326
}
435
327
…
…
476
368
}
477
369
478
/\*\*
479
\* Returns the currently registered loaders indexed by their corresponding vendor directories.
480
\*
481
\* @return self\[\]
482
\*/
483
public static function getRegisteredLoaders()
484
{
485
return self::$registeredLoaders;
486
}
487
488
/\*\*
489
\* @param string $class
490
\* @param string $ext
491
\* @return string|false
492
\*/
493
370
private function findFileWithExtension($class, $ext)
494
371
{
…
…
562
439
\*
563
440
\* Prevents access to $this/self from included files.
564
\*
565
\* @param string $file
566
\* @return void
567
\* @private
568
441
\*/
569
442
function includeFile($file)
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/InstalledVersions.php
r2667063
r2697388
21
21
\* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
22
22
\*
23
\* To require its presence, you can require \`composer-runtime-api ^2.0\`
23
\* To require it's presence, you can require \`composer-runtime-api ^2.0\`
24
24
\*/
25
25
class InstalledVersions
26
26
{
27
/\*\*
28
\* @var mixed\[\]|null
29
\* @psalm-var array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}|array{}|null
30
\*/
31
27
private static $installed;
32
33
/\*\*
34
\* @var bool|null
35
\*/
36
28
private static $canGetVendors;
37
38
/\*\*
39
\* @var array\[\]
40
\* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}>
41
\*/
42
29
private static $installedByVendor = array();
43
30
…
…
242
229
/\*\*
243
230
\* @return array
244
\* @psalm-return array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}
231
\* @psalm-return array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}
245
232
\*/
246
233
public static function getRootPackage()
…
…
256
243
\* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
257
244
\* @return array\[\]
258
\* @psalm-return array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}
245
\* @psalm-return array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>}
259
246
\*/
260
247
public static function getRawData()
…
…
279
266
\*
280
267
\* @return array\[\]
281
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}>
268
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>}>
282
269
\*/
283
270
public static function getAllRawData()
…
…
302
289
\* @return void
303
290
\*
304
\* @psalm-param array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>} $data
291
\* @psalm-param array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>} $data
305
292
\*/
306
293
public static function reload($data)
…
…
312
299
/\*\*
313
300
\* @return array\[\]
314
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string, type: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string, type?: string}>}>
301
\* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty\_version: string, aliases: string\[\], dev: bool, install\_path: string}, versions: array<string, array{dev\_requirement: bool, pretty\_version?: string, version?: string, aliases?: string\[\], reference?: string, replaced?: string\[\], provided?: string\[\], install\_path?: string}>}>
315
302
\*/
316
303
private static function getInstalled()
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/LICENSE
r2667063
r2697388
1
2
1
Copyright (c) Nils Adermann, Jordi Boggiano
3
2
…
…
19
18
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
19
THE SOFTWARE.
21
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/autoload_classmap.php
r2667063
r2697388
7
7
8
8
return array(
9
'Composer\\\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
9
);
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/autoload_real.php
r2667063
r2697388
23
23
}
24
24
25
require \_\_DIR\_\_ . '/platform\_check.php';
26
27
25
spl\_autoload\_register(array('ComposerAutoloaderInitce2073d68aa3da842e5b37a3b60e999a', 'loadClassLoader'), true, true);
28
self::$loader = $loader = new \\Composer\\Autoload\\ClassLoader(\\dirname(\\dirname(\_\_FILE\_\_)));
26
self::$loader = $loader = new \\Composer\\Autoload\\ClassLoader();
29
27
spl\_autoload\_unregister(array('ComposerAutoloaderInitce2073d68aa3da842e5b37a3b60e999a', 'loadClassLoader'));
30
28
31
29
$useStaticLoader = PHP\_VERSION\_ID >= 50600 && !defined('HHVM\_VERSION') && (!function\_exists('zend\_loader\_file\_encoded') || !zend\_loader\_file\_encoded());
32
30
if ($useStaticLoader) {
33
require \_\_DIR\_\_ . '/autoload\_static.php';
31
require\_once \_\_DIR\_\_ . '/autoload\_static.php';
34
32
35
33
call\_user\_func(\\Composer\\Autoload\\ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::getInitializer($loader));
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/autoload_static.php
r2667063
r2697388
29
29
);
30
30
31
public static $classMap = array (
32
'Composer\\\\InstalledVersions' => \_\_DIR\_\_ . '/..' . '/composer/InstalledVersions.php',
33
);
34
35
31
public static function getInitializer(ClassLoader $loader)
36
32
{
…
…
38
34
$loader->prefixLengthsPsr4 = ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::$prefixLengthsPsr4;
39
35
$loader->prefixDirsPsr4 = ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::$prefixDirsPsr4;
40
$loader->classMap = ComposerStaticInitce2073d68aa3da842e5b37a3b60e999a::$classMap;
41
36
42
37
}, null, ClassLoader::class);
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/installed.json
r2667063
r2697388
1
{
2
"packages": \[
3
{
4
"name": "composer/installers",
5
"version": "v1.11.0",
6
"version\_normalized": "1.11.0.0",
7
"source": {
8
"type": "git",
9
"url": "https://github.com/composer/installers.git",
10
"reference": "ae03311f45dfe194412081526be2e003960df74b"
1
\[
2
{
3
"name": "composer/installers",
4
"version": "v1.11.0",
5
"version\_normalized": "1.11.0.0",
6
"source": {
7
"type": "git",
8
"url": "https://github.com/composer/installers.git",
9
"reference": "ae03311f45dfe194412081526be2e003960df74b"
10
},
11
"dist": {
12
"type": "zip",
13
"url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b",
14
"reference": "ae03311f45dfe194412081526be2e003960df74b",
15
"shasum": ""
16
},
17
"require": {
18
"composer-plugin-api": "^1.0 || ^2.0"
19
},
20
"replace": {
21
"roundcube/plugin-installer": "\*",
22
"shama/baton": "\*"
23
},
24
"require-dev": {
25
"composer/composer": "1.6.\* || ^2.0",
26
"composer/semver": "^1 || ^3",
27
"phpstan/phpstan": "^0.12.55",
28
"phpstan/phpstan-phpunit": "^0.12.16",
29
"symfony/phpunit-bridge": "^4.2 || ^5",
30
"symfony/process": "^2.3"
31
},
32
"time": "2021-04-28T06:42:17+00:00",
33
"type": "composer-plugin",
34
"extra": {
35
"class": "Composer\\\\Installers\\\\Plugin",
36
"branch-alias": {
37
"dev-main": "1.x-dev"
38
}
39
},
40
"installation-source": "dist",
41
"autoload": {
42
"psr-4": {
43
"Composer\\\\Installers\\\\": "src/Composer/Installers"
44
}
45
},
46
"notification-url": "https://packagist.org/downloads/",
47
"license": \[
48
"MIT"
49
\],
50
"authors": \[
51
{
52
"name": "Kyle Robinson Young",
53
"email": "[email protected]",
54
"homepage": "https://github.com/shama"
55
}
56
\],
57
"description": "A multi-framework Composer library installer",
58
"homepage": "https://composer.github.io/installers/",
59
"keywords": \[
60
"Craft",
61
"Dolibarr",
62
"Eliasis",
63
"Hurad",
64
"ImageCMS",
65
"Kanboard",
66
"Lan Management System",
67
"MODX Evo",
68
"MantisBT",
69
"Mautic",
70
"Maya",
71
"OXID",
72
"Plentymarkets",
73
"Porto",
74
"RadPHP",
75
"SMF",
76
"Starbug",
77
"Thelia",
78
"Whmcs",
79
"WolfCMS",
80
"agl",
81
"aimeos",
82
"annotatecms",
83
"attogram",
84
"bitrix",
85
"cakephp",
86
"chef",
87
"cockpit",
88
"codeigniter",
89
"concrete5",
90
"croogo",
91
"dokuwiki",
92
"drupal",
93
"eZ Platform",
94
"elgg",
95
"expressionengine",
96
"fuelphp",
97
"grav",
98
"installer",
99
"itop",
100
"joomla",
101
"known",
102
"kohana",
103
"laravel",
104
"lavalite",
105
"lithium",
106
"magento",
107
"majima",
108
"mako",
109
"mediawiki",
110
"miaoxing",
111
"modulework",
112
"modx",
113
"moodle",
114
"osclass",
115
"phpbb",
116
"piwik",
117
"ppi",
118
"processwire",
119
"puppet",
120
"pxcms",
121
"reindex",
122
"roundcube",
123
"shopware",
124
"silverstripe",
125
"sydes",
126
"sylius",
127
"symfony",
128
"tastyigniter",
129
"typo3",
130
"wordpress",
131
"yawik",
132
"zend",
133
"zikula"
134
\],
135
"support": {
136
"issues": "https://github.com/composer/installers/issues",
137
"source": "https://github.com/composer/installers/tree/v1.11.0"
138
},
139
"funding": \[
140
{
141
"url": "https://packagist.com",
142
"type": "custom"
11
143
},
12
"dist": {
13
"type": "zip",
14
"url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b",
15
"reference": "ae03311f45dfe194412081526be2e003960df74b",
16
"shasum": ""
144
{
145
"url": "https://github.com/composer",
146
"type": "github"
17
147
},
18
"require": {
19
"composer-plugin-api": "^1.0 || ^2.0"
20
},
21
"replace": {
22
"roundcube/plugin-installer": "\*",
23
"shama/baton": "\*"
24
},
25
"require-dev": {
26
"composer/composer": "1.6.\* || ^2.0",
27
"composer/semver": "^1 || ^3",
28
"phpstan/phpstan": "^0.12.55",
29
"phpstan/phpstan-phpunit": "^0.12.16",
30
"symfony/phpunit-bridge": "^4.2 || ^5",
31
"symfony/process": "^2.3"
32
},
33
"time": "2021-04-28T06:42:17+00:00",
34
"type": "composer-plugin",
35
"extra": {
36
"class": "Composer\\\\Installers\\\\Plugin",
37
"branch-alias": {
38
"dev-main": "1.x-dev"
39
}
40
},
41
"installation-source": "dist",
42
"autoload": {
43
"psr-4": {
44
"Composer\\\\Installers\\\\": "src/Composer/Installers"
45
}
46
},
47
"notification-url": "https://packagist.org/downloads/",
48
"license": \[
49
"MIT"
50
\],
51
"authors": \[
52
{
53
"name": "Kyle Robinson Young",
54
"email": "[email protected]",
55
"homepage": "https://github.com/shama"
56
}
57
\],
58
"description": "A multi-framework Composer library installer",
59
"homepage": "https://composer.github.io/installers/",
60
"keywords": \[
61
"Craft",
62
"Dolibarr",
63
"Eliasis",
64
"Hurad",
65
"ImageCMS",
66
"Kanboard",
67
"Lan Management System",
68
"MODX Evo",
69
"MantisBT",
70
"Mautic",
71
"Maya",
72
"OXID",
73
"Plentymarkets",
74
"Porto",
75
"RadPHP",
76
"SMF",
77
"Starbug",
78
"Thelia",
79
"Whmcs",
80
"WolfCMS",
81
"agl",
82
"aimeos",
83
"annotatecms",
84
"attogram",
85
"bitrix",
86
"cakephp",
87
"chef",
88
"cockpit",
89
"codeigniter",
90
"concrete5",
91
"croogo",
92
"dokuwiki",
93
"drupal",
94
"eZ Platform",
95
"elgg",
96
"expressionengine",
97
"fuelphp",
98
"grav",
99
"installer",
100
"itop",
101
"joomla",
102
"known",
103
"kohana",
104
"laravel",
105
"lavalite",
106
"lithium",
107
"magento",
108
"majima",
109
"mako",
110
"mediawiki",
111
"miaoxing",
112
"modulework",
113
"modx",
114
"moodle",
115
"osclass",
116
"phpbb",
117
"piwik",
118
"ppi",
119
"processwire",
120
"puppet",
121
"pxcms",
122
"reindex",
123
"roundcube",
124
"shopware",
125
"silverstripe",
126
"sydes",
127
"sylius",
128
"symfony",
129
"tastyigniter",
130
"typo3",
131
"wordpress",
132
"yawik",
133
"zend",
134
"zikula"
135
\],
136
"support": {
137
"issues": "https://github.com/composer/installers/issues",
138
"source": "https://github.com/composer/installers/tree/v1.11.0"
139
},
140
"funding": \[
141
{
142
"url": "https://packagist.com",
143
"type": "custom"
144
},
145
{
146
"url": "https://github.com/composer",
147
"type": "github"
148
},
149
{
150
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
151
"type": "tidelift"
152
}
153
\],
154
"install-path": "./installers"
155
},
156
{
157
"name": "stripe/stripe-php",
158
"version": "v7.47.0",
159
"version\_normalized": "7.47.0.0",
160
"source": {
161
"type": "git",
162
"url": "https://github.com/stripe/stripe-php.git",
163
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306"
164
},
165
"dist": {
166
"type": "zip",
167
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/b51656cb398d081fcee53a76f6edb8fd5c1a5306",
168
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306",
169
"shasum": ""
170
},
171
"require": {
172
"ext-curl": "\*",
173
"ext-json": "\*",
174
"ext-mbstring": "\*",
175
"php": ">=5.6.0"
176
},
177
"require-dev": {
178
"friendsofphp/php-cs-fixer": "2.16.1",
179
"php-coveralls/php-coveralls": "^2.1",
180
"phpunit/phpunit": "^5.7",
181
"squizlabs/php\_codesniffer": "^3.3",
182
"symfony/process": "~3.4"
183
},
184
"time": "2020-08-13T22:35:56+00:00",
185
"type": "library",
186
"extra": {
187
"branch-alias": {
188
"dev-master": "2.0-dev"
189
}
190
},
191
"installation-source": "dist",
192
"autoload": {
193
"psr-4": {
194
"Stripe\\\\": "lib/"
195
}
196
},
197
"notification-url": "https://packagist.org/downloads/",
198
"license": \[
199
"MIT"
200
\],
201
"authors": \[
202
{
203
"name": "Stripe and contributors",
204
"homepage": "https://github.com/stripe/stripe-php/contributors"
205
}
206
\],
207
"description": "Stripe PHP Library",
208
"homepage": "https://stripe.com/",
209
"keywords": \[
210
"api",
211
"payment processing",
212
"stripe"
213
\],
214
"support": {
215
"issues": "https://github.com/stripe/stripe-php/issues",
216
"source": "https://github.com/stripe/stripe-php/tree/v7.47.0"
217
},
218
"install-path": "../stripe/stripe-php"
148
{
149
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
150
"type": "tidelift"
151
}
152
\]
153
},
154
{
155
"name": "stripe/stripe-php",
156
"version": "v7.47.0",
157
"version\_normalized": "7.47.0.0",
158
"source": {
159
"type": "git",
160
"url": "https://github.com/stripe/stripe-php.git",
161
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306"
162
},
163
"dist": {
164
"type": "zip",
165
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/b51656cb398d081fcee53a76f6edb8fd5c1a5306",
166
"reference": "b51656cb398d081fcee53a76f6edb8fd5c1a5306",
167
"shasum": ""
168
},
169
"require": {
170
"ext-curl": "\*",
171
"ext-json": "\*",
172
"ext-mbstring": "\*",
173
"php": ">=5.6.0"
174
},
175
"require-dev": {
176
"friendsofphp/php-cs-fixer": "2.16.1",
177
"php-coveralls/php-coveralls": "^2.1",
178
"phpunit/phpunit": "^5.7",
179
"squizlabs/php\_codesniffer": "^3.3",
180
"symfony/process": "~3.4"
181
},
182
"time": "2020-08-13T22:35:56+00:00",
183
"type": "library",
184
"extra": {
185
"branch-alias": {
186
"dev-master": "2.0-dev"
187
}
188
},
189
"installation-source": "dist",
190
"autoload": {
191
"psr-4": {
192
"Stripe\\\\": "lib/"
193
}
194
},
195
"notification-url": "https://packagist.org/downloads/",
196
"license": \[
197
"MIT"
198
\],
199
"authors": \[
200
{
201
"name": "Stripe and contributors",
202
"homepage": "https://github.com/stripe/stripe-php/contributors"
203
}
204
\],
205
"description": "Stripe PHP Library",
206
"homepage": "https://stripe.com/",
207
"keywords": \[
208
"api",
209
"payment processing",
210
"stripe"
211
\],
212
"support": {
213
"issues": "https://github.com/stripe/stripe-php/issues",
214
"source": "https://github.com/stripe/stripe-php/tree/v7.47.0"
219
215
}
220
\],
221
"dev": false,
222
"dev-package-names": \[\]
223
}
216
}
217
\]
easy-digital-downloads/trunk/includes/gateways/stripe/vendor/composer/installed.php
r2667063
r2697388
6
6
'install\_path' => \_\_DIR\_\_ . '/../../',
7
7
'aliases' => array(),
8
'reference' => 'a624654f272e48561b9fb698336f1e55c230df51',
8
'reference' => 'e7f98d164d4da798f7126fec7d294fce16299e5d',
9
9
'name' => 'easy-digital-downloads/edd-stripe',
10
10
'dev' => false,
…
…
26
26
'install\_path' => \_\_DIR\_\_ . '/../../',
27
27
'aliases' => array(),
28
'reference' => 'a624654f272e48561b9fb698336f1e55c230df51',
28
'reference' => 'e7f98d164d4da798f7126fec7d294fce16299e5d',
29
29
'dev\_requirement' => false,
30
30
),
easy-digital-downloads/trunk/languages/easy-digital-downloads.pot
r2667063
r2697388
3
3
msgid ""
4
4
msgstr ""
5
"Project-Id-Version: Easy Digital Downloads 2.11.5\\n"
5
"Project-Id-Version: Easy Digital Downloads 2.11.6\\n"
6
6
"Report-Msgid-Bugs-To: https://easydigitaldownloads.com/\\n"
7
"POT-Creation-Date: 2022-01-27 12:49:30+00:00\\n"
7
"POT-Creation-Date: 2022-03-22 00:09:47+00:00\\n"
8
8
"MIME-Version: 1.0\\n"
9
9
"Content-Type: text/plain; charset=utf-8\\n"
…
…
75
75
#: includes/admin/payments/actions.php:295
76
76
#: includes/admin/payments/actions.php:318
77
#: includes/admin/payments/actions.php:334
78
#: includes/admin/payments/actions.php:361
79
#: includes/admin/payments/actions.php:381
77
#: includes/admin/payments/actions.php:331
78
#: includes/admin/payments/actions.php:338
79
#: includes/admin/payments/actions.php:367
80
#: includes/admin/payments/actions.php:387
80
81
#: includes/admin/payments/view-order-details.php:22
81
82
#: includes/admin/payments/view-order-details.php:32
…
…
532
533
#: includes/admin/customers/class-customer-table.php:72
533
534
#: includes/admin/payments/class-payments-table.php:274
534
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:153
535
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:155
535
536
#: includes/admin/reporting/class-sales-logs-list-table.php:129
536
537
msgid "Customer"
…
…
674
675
#: includes/admin/import/import-functions.php:31
675
676
#: includes/admin/import/import-functions.php:113
677
#: includes/admin/payments/actions.php:331
676
678
#: includes/admin/reporting/export/export-actions.php:23
677
679
#: includes/api/class-edd-api.php:1980
…
…
927
929
#: includes/admin/reporting/class-export-payments.php:78
928
930
#: includes/admin/reporting/class-export.php:67
929
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:157
931
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:159
930
932
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:131
931
933
#: includes/admin/reporting/class-sales-logs-list-table.php:133
…
…
1019
1021
#: includes/admin/reporting/export/class-batch-export-downloads.php:56
1020
1022
msgid "Notes"
1023
msgstr ""
1024
1025
#: includes/admin/customers/customers.php:618
1026
#: includes/admin/payments/view-order-details.php:832
1027
msgid "Add Note"
1021
1028
msgstr ""
1022
1029
…
…
1302
1309
#: includes/admin/discounts/class-discount-codes-table.php:125
1303
1310
#: includes/admin/payments/class-payments-table.php:247
1304
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:320
1311
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:322
1305
1312
#: includes/admin/reporting/class-sales-logs-list-table.php:281
1306
1313
msgid "All"
…
…
2085
2092
msgstr ""
2086
2093
2087
#: includes/admin/extensions/product-education/class-email-marketing.php:91
2094
#: includes/admin/extensions/product-education/class-email-marketing.php:88
2088
2095
msgid ""
2089
2096
"Looks like you have an email marketing extension installed, but we support "
…
…
2181
2188
#: includes/admin/payments/actions.php:25
2182
2189
#: includes/admin/payments/actions.php:318
2183
#: includes/admin/payments/actions.php:334
2184
#: includes/admin/payments/actions.php:361
2185
#: includes/admin/payments/actions.php:381 includes/emails/actions.php:53
2190
#: includes/admin/payments/actions.php:338
2191
#: includes/admin/payments/actions.php:367
2192
#: includes/admin/payments/actions.php:387 includes/emails/actions.php:53
2186
2193
msgid "You do not have permission to edit this payment record"
2187
2194
msgstr ""
…
…
2711
2718
msgstr ""
2712
2719
2713
#: includes/admin/payments/view-order-details.php:832
2714
msgid "Add Note"
2715
msgstr ""
2716
2717
2720
#: includes/admin/plugins.php:27
2718
2721
msgid "General Settings"
…
…
2772
2775
msgstr ""
2773
2776
2774
#: includes/admin/promos/notices/class-license-upgrade-notice.php:151
2777
#: includes/admin/promos/notices/class-license-upgrade-notice.php:168
2775
2778
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2776
2779
msgid ""
2777
2780
"You are using the free version of Easy Digital Downloads. %1$sPurchase a "
2778
"pass%2$s to get email marketing tools and recurring payments."
2779
msgstr ""
2780
2781
#: includes/admin/promos/notices/class-license-upgrade-notice.php:161
2781
"pass%2$s to get email marketing tools and recurring payments. %3$sAlready "
2782
"have a Pass?%4$s"
2783
msgstr ""
2784
2785
#: includes/admin/promos/notices/class-license-upgrade-notice.php:180
2782
2786
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2783
2787
msgid ""
…
…
2786
2790
msgstr ""
2787
2791
2788
#: includes/admin/promos/notices/class-license-upgrade-notice.php:171
2792
#: includes/admin/promos/notices/class-license-upgrade-notice.php:190
2789
2793
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2790
2794
msgid ""
…
…
2793
2797
msgstr ""
2794
2798
2795
#: includes/admin/promos/notices/class-license-upgrade-notice.php:181
2799
#: includes/admin/promos/notices/class-license-upgrade-notice.php:201
2796
2800
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2797
2801
msgid ""
…
…
2800
2804
msgstr ""
2801
2805
2806
#: includes/admin/promos/notices/class-license-upgrade-notice.php:208
2807
#. Translators: %1$s opening anchor tag; %2$s closing anchor tag
2808
msgid ""
2809
"Gain access to powerful insights to grow your traffic and revenue. %1$sGet "
2810
"MonsterInsights%2$s"
2811
msgstr ""
2812
2802
2813
#: includes/admin/reporting/class-api-requests-logs-list-table.php:87
2803
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:151
2814
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:153
2804
2815
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:126
2805
2816
#: includes/admin/reporting/class-sales-logs-list-table.php:128
…
…
2923
2934
2924
2935
#: includes/admin/reporting/class-export-download-history.php:64
2925
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:156
2936
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:158
2926
2937
#: includes/admin/reporting/export/class-batch-export-api-requests.php:41
2927
2938
#: includes/admin/reporting/export/class-batch-export-file-downloads.php:43
…
…
2938
2949
2939
2950
#: includes/admin/reporting/class-export-download-history.php:66
2940
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:155
2951
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:157
2941
2952
#: includes/admin/reporting/export/class-batch-export-file-downloads.php:45
2942
2953
msgid "File"
…
…
3033
3044
msgstr ""
3034
3045
3035
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:154
3046
#: includes/admin/reporting/class-file-downloads-logs-list-table.php:156
3036
3047
#: includes/admin/reporting/class-gateway-error-logs-list-table.php:127
3037
3048
#: includes/admin/reporting/class-sales-logs-list-table.php:132
…
…
7188
7199
#: includes/gateways/paypal-standard.php:475
7189
7200
#: includes/gateways/paypal-standard.php:482
7190
#: includes/gateways/paypal-standard.php:571
7191
#: includes/gateways/paypal-standard.php:581
7192
#: includes/gateways/paypal-standard.php:654
7193
#: includes/gateways/paypal-standard.php:663
7201
#: includes/gateways/paypal-standard.php:574
7202
#: includes/gateways/paypal-standard.php:584
7203
#: includes/gateways/paypal-standard.php:657
7204
#: includes/gateways/paypal-standard.php:666
7194
7205
msgid "IPN Error"
7195
7206
msgstr ""
…
…
7521
7532
7522
7533
#: includes/gateways/paypal/checkout-actions.php:399
7523
#: includes/gateways/paypal-standard.php:671
7534
#: includes/gateways/paypal-standard.php:674
7524
7535
#: tests/helpers/class-helper-payment.php:131
7525
7536
#: tests/helpers/class-helper-payment.php:234
…
…
7799
7810
msgstr ""
7800
7811
7801
#: includes/gateways/paypal-standard.php:571
7812
#: includes/gateways/paypal-standard.php:574
7802
7813
msgid "Invalid business email in IPN response. IPN data: %s"
7803
7814
msgstr ""
7804
7815
7805
#: includes/gateways/paypal-standard.php:574
7816
#: includes/gateways/paypal-standard.php:577
7806
7817
msgid "Payment failed due to invalid PayPal business email."
7807
7818
msgstr ""
7808
7819
7809
#: includes/gateways/paypal-standard.php:581
7820
#: includes/gateways/paypal-standard.php:584
7810
7821
msgid "Invalid currency in IPN response. IPN data: %s"
7811
7822
msgstr ""
7812
7823
7813
#: includes/gateways/paypal-standard.php:584
7824
#: includes/gateways/paypal-standard.php:587
7814
7825
msgid "Payment failed due to invalid currency in PayPal IPN."
7815
7826
msgstr ""
7816
7827
7817
#: includes/gateways/paypal-standard.php:654
7828
#: includes/gateways/paypal-standard.php:657
7818
7829
msgid "Invalid payment amount in IPN response. IPN data: %s"
7819
7830
msgstr ""
7820
7831
7821
#: includes/gateways/paypal-standard.php:657
7832
#: includes/gateways/paypal-standard.php:660
7822
7833
msgid "Payment failed due to invalid amount in PayPal IPN."
7823
7834
msgstr ""
7824
7835
7825
#: includes/gateways/paypal-standard.php:663
7836
#: includes/gateways/paypal-standard.php:666
7826
7837
msgid "Invalid purchase key in IPN response. IPN data: %s"
7827
7838
msgstr ""
7828
7839
7829
#: includes/gateways/paypal-standard.php:665
7840
#: includes/gateways/paypal-standard.php:668
7830
7841
msgid "Payment failed due to invalid purchase key in PayPal IPN."
7831
7842
msgstr ""
7832
7843
7833
#: includes/gateways/paypal-standard.php:685
7844
#: includes/gateways/paypal-standard.php:688
7834
7845
msgid "Payment made via eCheck and will clear automatically in 5-8 days"
7835
7846
msgstr ""
7836
7847
7837
#: includes/gateways/paypal-standard.php:692
7848
#: includes/gateways/paypal-standard.php:695
7838
7849
msgid ""
7839
7850
"Payment requires a confirmed customer address and must be accepted manually "
…
…
7841
7852
msgstr ""
7842
7853
7843
#: includes/gateways/paypal-standard.php:698
7854
#: includes/gateways/paypal-standard.php:701
7844
7855
msgid ""
7845
7856
"Payment must be accepted manually through PayPal due to international "
…
…
7847
7858
msgstr ""
7848
7859
7849
#: includes/gateways/paypal-standard.php:704
7860
#: includes/gateways/paypal-standard.php:707
7850
7861
msgid ""
7851
7862
"Payment received in non-shop currency and must be accepted manually through "
…
…
7853
7864
msgstr ""
7854
7865
7855
#: includes/gateways/paypal-standard.php:711
7866
#: includes/gateways/paypal-standard.php:714
7856
7867
msgid ""
7857
7868
"Payment is being reviewed by PayPal staff as high-risk or in possible "
…
…
7859
7870
msgstr ""
7860
7871
7861
#: includes/gateways/paypal-standard.php:717
7872
#: includes/gateways/paypal-standard.php:720
7862
7873
msgid "Payment was sent to non-confirmed or non-registered email address."
7863
7874
msgstr ""
7864
7875
7865
#: includes/gateways/paypal-standard.php:723
7876
#: includes/gateways/paypal-standard.php:726
7866
7877
msgid "PayPal account must be upgraded before this payment can be accepted"
7867
7878
msgstr ""
7868
7879
7869
#: includes/gateways/paypal-standard.php:729
7880
#: includes/gateways/paypal-standard.php:732
7870
7881
msgid ""
7871
7882
"PayPal account is not verified. Verify account in order to accept this "
…
…
7873
7884
msgstr ""
7874
7885
7875
#: includes/gateways/paypal-standard.php:735
7886
#: includes/gateways/paypal-standard.php:738
7876
7887
msgid ""
7877
7888
"Payment is pending for unknown reasons. Contact PayPal support for "
…
…
7879
7890
msgstr ""
7880
7891
7881
#: includes/gateways/paypal-standard.php:788
7892
#: includes/gateways/paypal-standard.php:791
7882
7893
msgid "Partial PayPal refund processed: %s"
7883
7894
msgstr ""
7884
7895
7885
#: includes/gateways/paypal-standard.php:793
7896
#: includes/gateways/paypal-standard.php:796
7886
7897
msgid "PayPal Payment #%s Refunded for reason: %s"
7887
7898
msgstr ""
7888
7899
7889
#: includes/gateways/paypal-standard.php:794
7900
#: includes/gateways/paypal-standard.php:797
7890
7901
msgid "PayPal Refund Transaction ID: %s"
7891
7902
msgstr ""
7892
7903
7893
#: includes/gateways/paypal-standard.php:1008
7904
#: includes/gateways/paypal-standard.php:1011
7894
7905
msgid ""
7895
7906
"Payment could not be verified while validating PayPal PDT. Missing payment "
…
…
7897
7908
msgstr ""
7898
7909
7899
#: includes/gateways/paypal-standard.php:1019
7910
#: includes/gateways/paypal-standard.php:1022
7900
7911
msgid ""
7901
7912
"Payment failed while validating PayPal PDT. Amount expected: %f. Amount "
…
…
7903
7914
msgstr ""
7904
7915
7905
#: includes/gateways/paypal-standard.php:1049
7916
#: includes/gateways/paypal-standard.php:1052
7906
7917
msgid "Payment failed while validating PayPal PDT."
7907
7918
msgstr ""
7908
7919
7909
#: includes/gateways/paypal-standard.php:1056
7920
#: includes/gateways/paypal-standard.php:1059
7910
7921
msgid "PayPal PDT encountered an unexpected result, payment set to pending"
7911
7922
msgstr ""
7912
7923
7913
#: includes/gateways/paypal-standard.php:1141
7924
#: includes/gateways/paypal-standard.php:1144
7914
7925
msgid "Refund Payment in PayPal"
7915
7926
msgstr ""
7916
7927
7917
#: includes/gateways/paypal-standard.php:1288
7928
#: includes/gateways/paypal-standard.php:1291
7918
7929
msgid "PayPal refund failed for unknown reason."
7919
7930
msgstr ""
7920
7931
7921
#: includes/gateways/paypal-standard.php:1298
7932
#: includes/gateways/paypal-standard.php:1301
7922
7933
msgid "PayPal refund transaction ID: %s"
7923
7934
msgstr ""
7924
7935
7925
#: includes/gateways/paypal-standard.php:1302
7936
#: includes/gateways/paypal-standard.php:1305
7926
7937
msgid "PayPal refund failed: %s"
7927
7938
msgstr ""
easy-digital-downloads/trunk/readme.txt
r2677338
r2697388
6
6
Tags: ecommerce, e-commerce, sell, digital store, stripe
7
7
Requires at least: 4.4
8
Tested up to: 5.9
8
Tested up to: 5.9.2
9
9
Requires PHP: 5.4
10
Stable Tag: 2.11.5
10
Stable Tag: 2.11.6
11
11
License: GNU Version 2 or Any Later Version
12
12
…
…
65
65
\* Braintree
66
66
\* Authorize.net
67
\* 2Checkout
68
67
\* SOFORT Banking
69
68
…
…
241
240
242
241
\== Changelog ==
242
243
\= 2.11.6, March 21, 2022 =
244
\* Fix: Improved reliablity of PayPal Commerce modal while on checkout page.
245
\* Fix: PayPal Standard could throw an undefined variable notice when listening to the IPN.
246
\* Improvement: The link to configure Mailchimp could be wrong depending on the version of the extension.
247
\* Improvement: There was a hard coded string that wasn't able to be translated.
248
\* Improvement: Add a link to documentation about how to activate a Pass license key.
243
249
244
250
\= 2.11.5, January 27, 2022 =
Related news
Tp-Link TL-WR840N (EU) v6.20 Firmware (0.9.1 4.17 v0001.0 Build 201124 Rel.64328n) is vulnerable to Buffer Overflow via the Password reset feature.