diff --git a/assets/js/admin/settings/recapture/index.js b/assets/js/admin/settings/recapture/index.js index 8e4fcae024..546d2e5f3a 100644 --- a/assets/js/admin/settings/recapture/index.js +++ b/assets/js/admin/settings/recapture/index.js @@ -1,6 +1,7 @@ export const recaptureRemoteInstall = () => { var data = { 'action': 'edd_recapture_remote_install', + 'nonce': document.getElementById( 'edd-recapture-connect-nonce' ).value }; jQuery.post( ajaxurl, data, function( response ) { diff --git a/assets/js/edd-admin-settings.js b/assets/js/edd-admin-settings.js index c2cf2a2139..d1c096b1d6 100644 --- a/assets/js/edd-admin-settings.js +++ b/assets/js/edd-admin-settings.js @@ -1 +1 @@ -!function(e){var t={};function n(a){if(t[a])return t[a].exports;var d=t[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,n),d.l=!0,d.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var d in e)n.d(a,d,function(t){return e[t]}.bind(null,d));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=318)}({1:function(e,t){e.exports=jQuery},291:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var a=function(){e.post(ajaxurl,{action:"edd_recapture_remote_install"},(function(e){!e.success&&e.data&&confirm(e.data.error)?location.reload():window.location.href="https://recapture.io/register"}))}}).call(this,n(1))},318:function(e,t,n){"use strict";n.r(t),function(e,t){var a=n(291),d=(n(319),{init:function(){this.general(),this.misc(),this.gateways(),this.emails()},general:function(){var t,n=e(".edd-color-picker");n.length&&n.wpColorPicker(),window.formfield="",e(document.body).on("click",".edd_settings_upload_button",(function(n){n.preventDefault();var a=e(this);window.formfield=e(a.data("input")),t||((t=wp.media.frames.file_frame=wp.media({title:a.data("uploader_title"),library:{type:"image"},button:{text:a.data("uploader_button_text")},multiple:!1})).on("menu:render:default",(function(e){e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.unset("playlist"),e.unset("video-playlist"),e.set({})})),t.on("select",(function(){t.state().get("selection").each((function(e,t){e=e.toJSON(),window.formfield.val(e.url)}))}))),t.open()})),window.formfield=""},misc:function(){var t=e('select[name="edd_settings[download_method]"]'),n=t.parent().parent().next(),a=e('input[name="edd_settings[allow_tracking]"]');"direct"===t.val()&&(n.css("opacity","0.4"),n.find("input").prop("checked",!1).prop("disabled",!0)),t.on("change",(function(){"direct"===e(this).val()?(n.css("opacity","0.4"),n.find("input").prop("checked",!1).prop("disabled",!0)):(n.find("input").prop("disabled",!1),n.css("opacity","1"))})),a.on("change",(function(){e(".allow_tracking.edd-heart").toggleClass("edd-hidden")}))},gateways:function(){e('#edd-payment-gateways input[type="checkbox"]').on("change",(function(){var t=e(this).data("gateway-key"),n=e("#edd_settings\\[default_gateway\\]"),a=n.find('option[value="'+t+'"]');a.prop("disabled",(function(e,t){return!t})),a.prop("selected")&&a.prop("selected",!1),n.trigger("chosen:updated")}))},emails:function(){e("#edd-recapture-connect").on("click",(function(t){t.preventDefault(),e(this).html(edd_vars.wait+' '),document.body.style.cursor="wait",Object(a.a)()}));var t=e('select[name="edd_settings[email_summary_recipient]"]'),n=t.val(),d=e('textarea[name="edd_settings[email_summary_custom_recipients]"]').parents("tr"),o=e("#edd-send-test-summary-save-changes-notice"),s=e("#edd-send-test-summary"),i=e("#edd-send-test-summary-notice");t.on("change",(function(){d.toggleClass("hidden"),s.removeClass("hidden updated-message"),i.empty(),o.empty(),n!==t.val()&&(s.addClass("hidden"),o.html('

'+edd_vars.test_email_save_changes+"

"))})),s.on("click",(function(t){t.preventDefault(),e.ajax({type:"GET",dataType:"json",url:ajaxurl,data:{action:"edd_send_test_email_summary"},beforeSend:function(){i.empty(),s.addClass("updating-message").prop("disabled",!0)},success:function(e){"error"==e.status?i.html('

'+e.message+"

"):(s.addClass("updated-message"),setTimeout((function(){s.removeClass("updated-message")}),3e3))}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).done((function(e){s.removeClass("updating-message").prop("disabled",!1)}))}))}});t(document).ready((function(e){d.init()}))}.call(this,n(1),n(1))},319:function(e,t,n){(function(e){e(document).ready((function(t){if("undefined"!=typeof eddPayPalConnectVars){var n=document.getElementById("edd-paypal-commerce-errors");if(n&&n.length){for(;n.firstChild;)n.removeChild(n.firstChild);n.classList.remove("notice notice-error")}if(eddPayPalConnectVars.isConnected){var a=document.getElementById("edd-paypal-commerce-reconnect");a&&a.addEventListener("click",(function(e){e.preventDefault();var n=t("#edd-paypal-commerce-errors");n.empty().removeClass("notice notice-error"),a.classList.add("updating-message"),a.disabled=!0,t.post(ajaxurl,{action:"edd_paypal_commerce_reconnect",_ajax_nonce:a.dataset.nonce}).done((function(){})).fail((function(e){console.log("Reconnect failure",e.data),a.classList.remove("updating-message"),a.disabled=!1,n.html("

"+e.data+"

").addClass("notice notice-error")}))})),function e(){var n=document.getElementById("edd-paypal-commerce-connect-wrap");n&&t.post(ajaxurl,{action:"edd_paypal_commerce_get_account_info",_ajax_nonce:n.getAttribute("data-nonce")},(function(a){var d="

"+eddPayPalConnectVars.defaultError+"

";a.success?(d=a.data.account_status,a.data.actions&&a.data.actions.length&&(d+='

'+a.data.actions.join(" ")+"

"),a.data.disconnect_links&&a.data.disconnect_links.length&&(document.getElementById("edd-paypal-disconnect").innerHTML=a.data.disconnect_links.join(" "))):a.data&&a.data.message&&(d=a.data.message),n.innerHTML=d,n.classList.remove("notice-success","notice-warning","notice-error","loading");var o=a.success&&a.data.status?"notice-"+a.data.status:"notice-error";n.classList.add(o);var s,i=document.getElementById("edd-paypal-commerce-get-help");"success"===a.data.status?(i.classList.add("edd-hidden"),i.classList.remove("button","button-secondary")):(i.classList.remove("edd-hidden"),i.classList.add("button","button-secondary")),(s=document.querySelectorAll(".edd-paypal-connect-action"))&&s.length&&s.forEach((function(n){n.addEventListener("click",(function(n){n.preventDefault();var a=n.target;a.disabled=!0,a.classList.add("updating-message");var d=document.getElementById("edd-paypal-commerce-connect-wrap");d&&d.length&&d.remove(),t.post(ajaxurl,{action:a.dataset.action,_ajax_nonce:a.dataset.nonce}).done((function(){e()})).fail((function(e){console.log("Failure",e.data),a.disabled=!1,a.classList.remove("updating-message"),d.html("

"+e.data+"

").addClass("edd-paypal-actions-error-wrap")}))}))}))}))}()}else{if(document.getElementById("edd-paypal-commerce-link")){var d=document.createElement("script");d.id="edd-paypal-commerce-onboarding",d.src="https://www.paypal.com/webapps/merchantboarding/js/lib/lightbox/partner.js",document.body.appendChild(d),setTimeout((function(){"undefined"!==window.PAYPAL.apps.Signup&&window.PAYPAL.apps.Signup.render()}),1e3)}window.eddPayPalOnboardingCallback=function(t,n){var a=document.getElementById("edd-paypal-commerce-link"),d=document.getElementById("edd-paypal-commerce-errors");e.post(ajaxurl,{action:"edd_paypal_commerce_get_access_token",auth_code:t,share_id:n,_ajax_nonce:a.dataset.nonce}).done((function(){a.classList.add("disabled","updating-message"),a.disabled=!0})).fail((function(e){d.innerHTML="

"+e.data+"

",d.classList.add("notice","notice-error");var t=document.getElementById("edd-paypal-commerce-get-help");t.classList.remove("edd-hidden"),t.classList.add("button","button-secondary")}))}}}}))}).call(this,n(1))}}); \ No newline at end of file +!function(e){var t={};function n(a){if(t[a])return t[a].exports;var d=t[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,n),d.l=!0,d.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var d in e)n.d(a,d,function(t){return e[t]}.bind(null,d));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=318)}({1:function(e,t){e.exports=jQuery},291:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var a=function(){var t={action:"edd_recapture_remote_install",nonce:document.getElementById("edd-recapture-connect-nonce").value};e.post(ajaxurl,t,(function(e){!e.success&&e.data&&confirm(e.data.error)?location.reload():window.location.href="https://recapture.io/register"}))}}).call(this,n(1))},318:function(e,t,n){"use strict";n.r(t),function(e,t){var a=n(291),d=(n(319),{init:function(){this.general(),this.misc(),this.gateways(),this.emails()},general:function(){var t,n=e(".edd-color-picker");n.length&&n.wpColorPicker(),window.formfield="",e(document.body).on("click",".edd_settings_upload_button",(function(n){n.preventDefault();var a=e(this);window.formfield=e(a.data("input")),t||((t=wp.media.frames.file_frame=wp.media({title:a.data("uploader_title"),library:{type:"image"},button:{text:a.data("uploader_button_text")},multiple:!1})).on("menu:render:default",(function(e){e.unset("library-separator"),e.unset("gallery"),e.unset("featured-image"),e.unset("embed"),e.unset("playlist"),e.unset("video-playlist"),e.set({})})),t.on("select",(function(){t.state().get("selection").each((function(e,t){e=e.toJSON(),window.formfield.val(e.url)}))}))),t.open()})),window.formfield=""},misc:function(){var t=e('select[name="edd_settings[download_method]"]'),n=t.parent().parent().next(),a=e('input[name="edd_settings[allow_tracking]"]');"direct"===t.val()&&(n.css("opacity","0.4"),n.find("input").prop("checked",!1).prop("disabled",!0)),t.on("change",(function(){"direct"===e(this).val()?(n.css("opacity","0.4"),n.find("input").prop("checked",!1).prop("disabled",!0)):(n.find("input").prop("disabled",!1),n.css("opacity","1"))})),a.on("change",(function(){e(".allow_tracking.edd-heart").toggleClass("edd-hidden")}))},gateways:function(){e('#edd-payment-gateways input[type="checkbox"]').on("change",(function(){var t=e(this).data("gateway-key"),n=e("#edd_settings\\[default_gateway\\]"),a=n.find('option[value="'+t+'"]');a.prop("disabled",(function(e,t){return!t})),a.prop("selected")&&a.prop("selected",!1),n.trigger("chosen:updated")}))},emails:function(){e("#edd-recapture-connect").on("click",(function(t){t.preventDefault(),e(this).html(edd_vars.wait+' '),document.body.style.cursor="wait",Object(a.a)()}));var t=e('select[name="edd_settings[email_summary_recipient]"]'),n=t.val(),d=e('textarea[name="edd_settings[email_summary_custom_recipients]"]').parents("tr"),o=e("#edd-send-test-summary-save-changes-notice"),s=e("#edd-send-test-summary"),c=e("#edd-send-test-summary-notice");t.on("change",(function(){d.toggleClass("hidden"),s.removeClass("hidden updated-message"),c.empty(),o.empty(),n!==t.val()&&(s.addClass("hidden"),o.html('

'+edd_vars.test_email_save_changes+"

"))})),s.on("click",(function(t){t.preventDefault(),e.ajax({type:"GET",dataType:"json",url:ajaxurl,data:{action:"edd_send_test_email_summary"},beforeSend:function(){c.empty(),s.addClass("updating-message").prop("disabled",!0)},success:function(e){"error"==e.status?c.html('

'+e.message+"

"):(s.addClass("updated-message"),setTimeout((function(){s.removeClass("updated-message")}),3e3))}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).done((function(e){s.removeClass("updating-message").prop("disabled",!1)}))}))}});t(document).ready((function(e){d.init()}))}.call(this,n(1),n(1))},319:function(e,t,n){(function(e){e(document).ready((function(t){if("undefined"!=typeof eddPayPalConnectVars){var n=document.getElementById("edd-paypal-commerce-errors");if(n&&n.length){for(;n.firstChild;)n.removeChild(n.firstChild);n.classList.remove("notice notice-error")}if(eddPayPalConnectVars.isConnected){var a=document.getElementById("edd-paypal-commerce-reconnect");a&&a.addEventListener("click",(function(e){e.preventDefault();var n=t("#edd-paypal-commerce-errors");n.empty().removeClass("notice notice-error"),a.classList.add("updating-message"),a.disabled=!0,t.post(ajaxurl,{action:"edd_paypal_commerce_reconnect",_ajax_nonce:a.dataset.nonce}).done((function(){})).fail((function(e){console.log("Reconnect failure",e.data),a.classList.remove("updating-message"),a.disabled=!1,n.html("

"+e.data+"

").addClass("notice notice-error")}))})),function e(){var n=document.getElementById("edd-paypal-commerce-connect-wrap");n&&t.post(ajaxurl,{action:"edd_paypal_commerce_get_account_info",_ajax_nonce:n.getAttribute("data-nonce")},(function(a){var d="

"+eddPayPalConnectVars.defaultError+"

";a.success?(d=a.data.account_status,a.data.actions&&a.data.actions.length&&(d+='

'+a.data.actions.join(" ")+"

"),a.data.disconnect_links&&a.data.disconnect_links.length&&(document.getElementById("edd-paypal-disconnect").innerHTML=a.data.disconnect_links.join(" "))):a.data&&a.data.message&&(d=a.data.message),n.innerHTML=d,n.classList.remove("notice-success","notice-warning","notice-error","loading");var o=a.success&&a.data.status?"notice-"+a.data.status:"notice-error";n.classList.add(o);var s,c=document.getElementById("edd-paypal-commerce-get-help");"success"===a.data.status?(c.classList.add("edd-hidden"),c.classList.remove("button","button-secondary")):(c.classList.remove("edd-hidden"),c.classList.add("button","button-secondary")),(s=document.querySelectorAll(".edd-paypal-connect-action"))&&s.length&&s.forEach((function(n){n.addEventListener("click",(function(n){n.preventDefault();var a=n.target;a.disabled=!0,a.classList.add("updating-message");var d=document.getElementById("edd-paypal-commerce-connect-wrap");d&&d.length&&d.remove(),t.post(ajaxurl,{action:a.dataset.action,_ajax_nonce:a.dataset.nonce}).done((function(){e()})).fail((function(e){console.log("Failure",e.data),a.disabled=!1,a.classList.remove("updating-message"),d.html("

"+e.data+"

").addClass("edd-paypal-actions-error-wrap")}))}))}))}))}()}else{if(document.getElementById("edd-paypal-commerce-link")){var d=document.createElement("script");d.id="edd-paypal-commerce-onboarding",d.src="https://www.paypal.com/webapps/merchantboarding/js/lib/lightbox/partner.js",document.body.appendChild(d),setTimeout((function(){"undefined"!==window.PAYPAL.apps.Signup&&window.PAYPAL.apps.Signup.render()}),1e3)}window.eddPayPalOnboardingCallback=function(t,n){var a=document.getElementById("edd-paypal-commerce-link"),d=document.getElementById("edd-paypal-commerce-errors");e.post(ajaxurl,{action:"edd_paypal_commerce_get_access_token",auth_code:t,share_id:n,_ajax_nonce:a.dataset.nonce}).done((function(){a.classList.add("disabled","updating-message"),a.disabled=!0})).fail((function(e){d.innerHTML="

"+e.data+"

",d.classList.add("notice","notice-error");var t=document.getElementById("edd-paypal-commerce-get-help");t.classList.remove("edd-hidden"),t.classList.add("button","button-secondary")}))}}}}))}).call(this,n(1))}}); \ No newline at end of file diff --git a/easy-digital-downloads.php b/easy-digital-downloads.php index f4796c3c75..20f06c64aa 100755 --- a/easy-digital-downloads.php +++ b/easy-digital-downloads.php @@ -5,7 +5,7 @@ * Description: The easiest way to sell digital products with WordPress. * Author: Easy Digital Downloads * Author URI: https://easydigitaldownloads.com - * Version: 3.2.11 + * Version: 3.2.12 * Text Domain: easy-digital-downloads * Domain Path: /languages * Requires at least: 5.8 @@ -27,7 +27,7 @@ * @package EDD * @category Core * @author Easy Digital Downloads - * @version 3.2.11 + * @version 3.2.12 */ // Exit if accessed directly. diff --git a/i18n/states-in.php b/i18n/states-in.php index 9b59b4da97..bf068603a7 100644 --- a/i18n/states-in.php +++ b/i18n/states-in.php @@ -35,7 +35,7 @@ 'WB' => __( 'West Bengal', 'easy-digital-downloads' ), 'AN' => __( 'Andaman and Nicobar Islands', 'easy-digital-downloads' ), 'CH' => __( 'Chandigarh', 'easy-digital-downloads' ), - 'DN' => __( 'Dadar and Nagar Haveli', 'easy-digital-downloads' ), + 'DN' => __( 'Dadra and Nagar Haveli', 'easy-digital-downloads' ), 'DD' => __( 'Daman and Diu', 'easy-digital-downloads' ), 'DL' => __( 'Delhi', 'easy-digital-downloads' ), 'LD' => __( 'Lakshadweep', 'easy-digital-downloads' ), diff --git a/includes/admin/reporting/export/class-batch-export.php b/includes/admin/reporting/export/class-batch-export.php index 9ee38f24de..2d827abcdc 100644 --- a/includes/admin/reporting/export/class-batch-export.php +++ b/includes/admin/reporting/export/class-batch-export.php @@ -133,12 +133,20 @@ class EDD_Batch_Export extends EDD_Export { */ public function __construct( $_step = 1 ) { - $upload_dir = wp_upload_dir(); + $exports_dir = edd_get_exports_dir(); $this->filetype = '.csv'; - $this->filename = 'edd-' . $this->export_type . $this->filetype; - $this->file = trailingslashit( $upload_dir['basedir'] ) . $this->filename; + $file_date = date( 'Y-m-d' ); + $file_hash = substr( wp_hash( 'edd-' . $this->export_type . '-export', 'nonce' ), 0, 8 ); + $this->filename = sprintf( + 'edd-%1$s-export-%2$s-%3$s%4$s', + $this->export_type, + $file_date, + $file_hash, + $this->filetype + ); + $this->file = trailingslashit( $exports_dir ) . $this->filename; - if ( ! is_writeable( $upload_dir['basedir'] ) ) { + if ( ! is_writeable( $exports_dir ) ) { $this->is_writable = false; } diff --git a/includes/admin/reporting/export/export-actions.php b/includes/admin/reporting/export/export-actions.php index f2a325273d..77de3b24b4 100644 --- a/includes/admin/reporting/export/export-actions.php +++ b/includes/admin/reporting/export/export-actions.php @@ -263,7 +263,7 @@ function edd_include_taxed_orders_batch_processor( $class ) { } /** - * Register the taxed orders report batch exporter. + * Register the taxed customers report batch exporter. * * @since 3.0 */ diff --git a/includes/admin/settings/register-settings.php b/includes/admin/settings/register-settings.php index 9f1c8d1f1b..9333014a8e 100755 --- a/includes/admin/settings/register-settings.php +++ b/includes/admin/settings/register-settings.php @@ -1811,8 +1811,10 @@ function edd_recapture_callback($args) {

- +

diff --git a/includes/class-easy-digital-downloads.php b/includes/class-easy-digital-downloads.php index 463b280877..46401dd2c1 100644 --- a/includes/class-easy-digital-downloads.php +++ b/includes/class-easy-digital-downloads.php @@ -370,7 +370,7 @@ private function setup_constants() { // Plugin version. if ( ! defined( 'EDD_VERSION' ) ) { - define( 'EDD_VERSION', '3.2.11' ); + define( 'EDD_VERSION', '3.2.12' ); } // Make sure CAL_GREGORIAN is defined. @@ -729,6 +729,7 @@ private function include_objects() { require_once EDD_PLUGIN_DIR . 'includes/emails/class-edd-emails.php'; require_once EDD_PLUGIN_DIR . 'includes/emails/class-edd-email-tags.php'; require_once EDD_PLUGIN_DIR . 'includes/emails/functions.php'; + require_once EDD_PLUGIN_DIR . 'includes/emails/recapture.php'; require_once EDD_PLUGIN_DIR . 'includes/emails/tags.php'; require_once EDD_PLUGIN_DIR . 'includes/emails/tags-inserter.php'; require_once EDD_PLUGIN_DIR . 'includes/emails/template.php'; diff --git a/includes/class-edd-cron.php b/includes/class-edd-cron.php index e6957bc01b..9cef9a344c 100755 --- a/includes/class-edd-cron.php +++ b/includes/class-edd-cron.php @@ -29,6 +29,7 @@ class EDD_Cron { public function __construct() { add_filter( 'cron_schedules', array( $this, 'add_schedules' ) ); add_action( 'wp', array( $this, 'schedule_events' ) ); + add_action( 'edd_daily_scheduled_events', array( $this, 'exports_cleanup' ) ); } /** @@ -86,5 +87,76 @@ private function daily_events() { } } + /** + * Cleanup after ourselves during exports. + * + * @since 3.2.12 + * + * @return void + */ + public function exports_cleanup() { + if ( class_exists( 'EDD\Cron\Loader' ) ) { + return; + } + + $exports_dir = edd_get_exports_dir(); + $files = scandir( $exports_dir ); + + if ( ! empty( $files ) ) { + foreach ( $files as $file ) { + if ( '.' === $file[0] ) { + continue; + } + + $full_path = trailingslashit( $exports_dir ) . $file; + + if ( is_dir( $full_path ) || ( 'index.php' === basename( $full_path ) || 'index.html' === basename( $full_path ) ) ) { + continue; + } + + $modified_time = filemtime( $full_path ); + + // If the file hasn't been modified in the last 2 hours, delete it. + if ( time() - $modified_time > HOUR_IN_SECONDS * 2 ) { + unlink( $full_path ); + } + } + } + + // Also remove any older exports in the uploads directory. + $uploads_dir = wp_upload_dir(); + $files = scandir( $uploads_dir['basedir'] ); + + if ( ! empty( $files ) ) { + foreach ( $files as $file ) { + if ( '.' === $file[0] ) { + continue; + } + + $full_path = trailingslashit( $uploads_dir['basedir'] ) . $file; + + if ( is_dir( $full_path ) || ( 'index.php' === basename( $full_path ) || 'index.html' === basename( $full_path ) ) ) { + continue; + } + + // If the filename doesn't start with `edd-` don't delete it. + if ( false === strpos( $file, 'edd-' ) ) { + continue; + } + + // If the file is not a .csv, don't delete it. + if ( '.csv' !== substr( $file, -4 ) ) { + continue; + } + + $modified_time = filemtime( $full_path ); + + // If the file hasn't been modified in the last 2 hours, delete it. + if ( time() - $modified_time > HOUR_IN_SECONDS * 2 ) { + unlink( $full_path ); + } + } + } + } } -$edd_cron = new EDD_Cron; +$edd_cron = new EDD_Cron(); diff --git a/includes/emails/functions.php b/includes/emails/functions.php index 40cd993163..9dfc2f91dd 100755 --- a/includes/emails/functions.php +++ b/includes/emails/functions.php @@ -46,130 +46,3 @@ function edd_admin_notices_disabled( $payment_id = 0 ) { $ret = edd_get_option( 'disable_admin_notices', false ); return (bool) apply_filters( 'edd_admin_notices_disabled', $ret, $payment_id ); } - -/** - * Handle installation and connection for Recapture via ajax - * - * @since 2.10.2 - */ -function edd_recapture_remote_install_handler () { - - if ( ! current_user_can( 'manage_shop_settings' ) || ! current_user_can( 'install_plugins' ) ) { - wp_send_json_error( array( - 'error' => __( 'You do not have permission to do this.', 'easy-digital-downloads' ) - ) ); - } - - include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; - include_once ABSPATH . 'wp-admin/includes/file.php'; - include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; - - $plugins = get_plugins(); - - if( ! array_key_exists( 'recapture-for-edd/recapture.php', $plugins ) ) { - - /* - * Use the WordPress Plugins API to get the plugin download link. - */ - $api = plugins_api( 'plugin_information', array( - 'slug' => 'recapture-for-edd', - ) ); - - if ( is_wp_error( $api ) ) { - wp_send_json_error( array( - 'error' => $api->get_error_message(), - 'debug' => $api - ) ); - } - - /* - * Use the AJAX Upgrader skin to quietly install the plugin. - */ - $upgrader = new Plugin_Upgrader( new WP_Ajax_Upgrader_Skin() ); - $install = $upgrader->install( $api->download_link ); - if ( is_wp_error( $install ) ) { - wp_send_json_error( array( - 'error' => $install->get_error_message(), - 'debug' => $api - ) ); - } - - $activated = activate_plugin( $upgrader->plugin_info() ); - - } else { - - $activated = activate_plugin( 'recapture-for-edd/recapture.php' ); - - } - - /* - * Final check to see if Recapture is available. - */ - if ( is_wp_error( $activated ) ) { - wp_send_json_error( array( - 'error' => __( 'Something went wrong. Recapture for EDD was not installed correctly.', 'easy-digital-downloads' ) - ) ); - } - - wp_send_json_success(); -} -add_action( 'wp_ajax_edd_recapture_remote_install', 'edd_recapture_remote_install_handler' ); - -/** - * Maybe adds a notice to abandoned payments if Recapture isn't installed. - * - * @since 2.10.2 - * - * @param int $payment_id The ID of the abandoned payment, for which a Recapture notice is being thrown. - */ -function maybe_add_recapture_notice_to_abandoned_payment( $payment_id ) { - - if ( ! class_exists( 'Recapture' ) - && 'abandoned' === edd_get_payment_status( $payment_id ) - && ! get_user_meta( get_current_user_id(), '_edd_try_recapture_dismissed', true ) - ) { - ?> -
-

- tag, %2$s - tag, %3$s - tag, %4$s - tag */ - __( '%1$sRecover abandoned purchases like this one.%2$s %3$sTry Recapture for free%4$s.', 'easy-digital-downloads' ), - '', - '', - '', - '' - ) - ); - ?> -

- 'dismiss_notices', - 'edd_notice' => 'try_recapture', - ) - ), - 'edd_notice_nonce' - ) - ), - '" type="button" class="notice-dismiss">', - '', - ' - ' - ) - ); - ?> -
- __( 'You do not have permission to do this.', 'easy-digital-downloads' ), + ) + ); + } + $nonce = filter_input( INPUT_POST, 'nonce', FILTER_SANITIZE_SPECIAL_CHARS ); + if ( ! $nonce || ! wp_verify_nonce( $nonce, 'edd-recapture-connect' ) ) { + wp_send_json_error( + array( + 'error' => __( 'Nonce verification failed.', 'easy-digital-downloads' ), + ) + ); + } + + include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; + include_once ABSPATH . 'wp-admin/includes/file.php'; + include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + + $plugins = get_plugins(); + + if ( ! array_key_exists( 'recapture-for-edd/recapture.php', $plugins ) ) { + + /** + * Use the WordPress Plugins API to get the plugin download link. + */ + $api = plugins_api( + 'plugin_information', + array( + 'slug' => 'recapture-for-edd', + ) + ); + + if ( is_wp_error( $api ) ) { + wp_send_json_error( + array( + 'error' => $api->get_error_message(), + 'debug' => $api, + ) + ); + } + + /* + * Use the AJAX Upgrader skin to quietly install the plugin. + */ + $upgrader = new Plugin_Upgrader( new WP_Ajax_Upgrader_Skin() ); + $install = $upgrader->install( $api->download_link ); + if ( is_wp_error( $install ) ) { + wp_send_json_error( + array( + 'error' => $install->get_error_message(), + 'debug' => $api, + ) + ); + } + + $activated = activate_plugin( $upgrader->plugin_info() ); + + } else { + + $activated = activate_plugin( 'recapture-for-edd/recapture.php' ); + + } + + /* + * Final check to see if Recapture is available. + */ + if ( is_wp_error( $activated ) ) { + wp_send_json_error( + array( + 'error' => __( 'Something went wrong. Recapture for EDD was not installed correctly.', 'easy-digital-downloads' ), + ) + ); + } + + wp_send_json_success(); +} +add_action( 'wp_ajax_edd_recapture_remote_install', 'edd_recapture_remote_install_handler' ); + +/** + * Maybe adds a notice to abandoned payments if Recapture isn't installed. + * + * @since 2.10.2 + * + * @param int $payment_id The ID of the abandoned payment, for which a Recapture notice is being thrown. + */ +function maybe_add_recapture_notice_to_abandoned_payment( $payment_id ) { + + if ( ! class_exists( 'Recapture' ) + && 'abandoned' === edd_get_payment_status( $payment_id ) + && ! get_user_meta( get_current_user_id(), '_edd_try_recapture_dismissed', true ) + ) { + ?> +
+

+ tag, %2$s - tag, %3$s - tag, %4$s - tag */ + __( '%1$sRecover abandoned purchases like this one.%2$s %3$sTry Recapture for free%4$s.', 'easy-digital-downloads' ), + '', + '', + '', + '' + ) + ); + ?> +

+ 'dismiss_notices', + 'edd_notice' => 'try_recapture', + ) + ), + 'edd_notice_nonce' + ) + ), + '" type="button" class="notice-dismiss">', + '', + ' + ' + ) + ); + ?> +
+ refunded ) { - $refund_id = edd_refund_order( $order->id ); - if ( $refund_id ) { + $refund_id = false; + if ( edd_is_order_refundable( $order->id ) ) { + $refund_id = edd_refund_order( $order->id ); + } else { + $refunds = edd_get_orders( + array( + 'type' => 'refund', + 'parent' => $order->id, + ) + ); + if ( ! empty( $refunds ) ) { + $refund_id = $refunds[0]->id; + } + } + if ( $refund_id && ! is_wp_error( $refund_id ) ) { edd_add_order_transaction( array( 'object_type' => 'order', diff --git a/includes/misc-functions.php b/includes/misc-functions.php index 968d7fba49..80634c5417 100755 --- a/includes/misc-functions.php +++ b/includes/misc-functions.php @@ -858,6 +858,26 @@ function edd_get_upload_dir() { return $retval; } +/** + * Retrieve the absolute path to the file export directory without the trailing slash. + * + * @since 3.2.12 + * + * @return string $path Absolute path to the EDD export directory + */ +function edd_get_exports_dir() { + $wp_upload_dir = wp_upload_dir(); + $edd_dir = edd_get_uploads_base_dir(); + $path = $wp_upload_dir['basedir'] . '/' . $edd_dir . '/exports'; + $exports_dir = apply_filters( 'edd_get_exports_dir', $path ); + + // Make sure the directory exists. + wp_mkdir_p( $exports_dir ); + + // Return, possibly filtered. + return $exports_dir; +} + /** * Retrieve the URL to the file upload directory without the trailing slash * diff --git a/includes/orders/classes/class-refund-validator.php b/includes/orders/classes/class-refund-validator.php index ad3ad66abd..51855b322a 100644 --- a/includes/orders/classes/class-refund-validator.php +++ b/includes/orders/classes/class-refund-validator.php @@ -387,7 +387,7 @@ private function validate_item_and_add_totals( $original_item, $amounts_to_refun * %1$s - adjustment description; * %3$s - maximum amount allowed for refund */ - __( 'The maximum refund %s for the adjustment "%s" is %s.', 'easy-digital-downloads' ), + __( 'The maximum refund %1$s for the adjustment "%2$s" is %3$s.', 'easy-digital-downloads' ), $column_name, $original_item->description, edd_currency_filter( $maximum_refundable_amounts[ $column_name ] ) diff --git a/languages/easy-digital-downloads.pot b/languages/easy-digital-downloads.pot index 2acab11ca5..512065d09b 100644 --- a/languages/easy-digital-downloads.pot +++ b/languages/easy-digital-downloads.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the Easy Digital Downloads (Pro) plugin. msgid "" msgstr "" -"Project-Id-Version: Easy Digital Downloads (Pro) 3.2.11\n" +"Project-Id-Version: Easy Digital Downloads (Pro) 3.2.12\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/easy-digital-downloads-pro\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-03-29T18:25:17+00:00\n" +"POT-Creation-Date: 2024-04-29T18:20:59+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" @@ -2518,7 +2518,7 @@ msgid "Chandigarh" msgstr "" #: i18n/states-in.php:38 -msgid "Dadar and Nagar Haveli" +msgid "Dadra and Nagar Haveli" msgstr "" #: i18n/states-in.php:39 @@ -5777,7 +5777,7 @@ msgstr "" #: includes/admin/reporting/class-api-requests-logs-list-table.php:106 #: includes/admin/reporting/class-export.php:188 #: includes/admin/reporting/class-gateway-error-logs-list-table.php:109 -#: includes/admin/reporting/export/class-batch-export.php:158 +#: includes/admin/reporting/export/class-batch-export.php:166 #: includes/admin/reporting/export/export-actions.php:24 #: includes/admin/tools.php:1161 #: includes/admin/tools.php:1167 @@ -6365,7 +6365,7 @@ msgstr "" #: includes/admin/customers/class-customer-email-addresses-table.php:131 #: includes/admin/customers/class-customer-table.php:127 #: includes/admin/payments/orders.php:1084 -#: includes/misc-functions.php:1436 +#: includes/misc-functions.php:1456 #: includes/payments/functions.php:537 msgid "Pending" msgstr "" @@ -6376,7 +6376,7 @@ msgstr "" #: includes/admin/customers/customers.php:583 #: includes/admin/discounts/edit-discount.php:287 #: includes/class-edd-discount.php:705 -#: includes/misc-functions.php:1431 +#: includes/misc-functions.php:1451 #: src/Admin/Promos/About.php:865 msgid "Active" msgstr "" @@ -6562,7 +6562,7 @@ msgstr "" #: includes/admin/customers/customers.php:584 #: includes/admin/discounts/edit-discount.php:288 #: includes/class-edd-discount.php:699 -#: includes/misc-functions.php:1432 +#: includes/misc-functions.php:1452 #: src/Admin/Promos/About.php:871 msgid "Inactive" msgstr "" @@ -6632,6 +6632,7 @@ msgstr "" #: includes/admin/reporting/export/export-actions.php:24 #: includes/api/class-edd-api.php:1978 #: includes/class-edd-license-handler.php:478 +#: includes/emails/recapture.php:24 #: includes/user-functions.php:958 #: src/Pro/Admin/Discounts/Generate.php:96 msgid "Nonce verification failed." @@ -7805,7 +7806,7 @@ msgid "Enable multi-option purchase mode. Allows multiple price options to be ad msgstr "" #: includes/admin/downloads/metabox.php:522 -#: src/Admin/Onboarding/Steps/Products.php:114 +#: src/Admin/Onboarding/Steps/Products.php:120 msgid "Add New Price" msgstr "" @@ -7823,7 +7824,6 @@ msgstr "" msgid "Show advanced settings" msgstr "" -#. translators: %1$s is the remove link, %2$s is the screen reader text. #: includes/admin/downloads/metabox.php:589 #: includes/admin/downloads/metabox.php:847 #: includes/admin/downloads/views/metabox-bundled-products.php:95 @@ -9416,7 +9416,7 @@ msgid "guest" msgstr "" #: includes/admin/reporting/class-export.php:188 -#: includes/admin/reporting/export/class-batch-export.php:158 +#: includes/admin/reporting/export/class-batch-export.php:166 #: includes/admin/tools/class-edd-tools-recount-customer-stats.php:114 #: includes/admin/tools/class-edd-tools-recount-store-earnings.php:157 #: includes/admin/tools/class-edd-tools-reset-stats.php:128 @@ -10484,24 +10484,24 @@ msgstr "" msgid "%1$sLearn more%2$s (Free trial available)" msgstr "" -#: includes/admin/settings/register-settings.php:1814 +#: includes/admin/settings/register-settings.php:1815 msgid "Connect with Recapture" msgstr "" #. translators: Tax rate country code -#: includes/admin/settings/register-settings.php:1847 +#: includes/admin/settings/register-settings.php:1849 msgid "Duplicate tax rates are not allowed. Please deactivate the existing %s tax rate before adding or activating another." msgstr "" -#: includes/admin/settings/register-settings.php:1848 +#: includes/admin/settings/register-settings.php:1850 msgid "Please select a country." msgstr "" -#: includes/admin/settings/register-settings.php:1849 +#: includes/admin/settings/register-settings.php:1851 msgid "Please enter a tax rate greater than 0." msgstr "" -#: includes/admin/settings/register-settings.php:1850 +#: includes/admin/settings/register-settings.php:1852 msgid "Are you sure you want to add a 0% tax rate?" msgstr "" @@ -10871,7 +10871,7 @@ msgid "Product Excerpt" msgstr "" #: includes/admin/tools.php:915 -#: src/Admin/Onboarding/Steps/Products.php:51 +#: src/Admin/Onboarding/Steps/Products.php:57 msgid "Product Image" msgstr "" @@ -12307,7 +12307,6 @@ msgstr "" msgid "You have successfully added %s to your shopping cart." msgstr "" -#. Translators: %s is the name of the download that was added to the cart. #: includes/cart/template.php:311 msgid "Checkout." msgstr "" @@ -13164,7 +13163,7 @@ msgstr "" msgid "Removing old orders." msgstr "" -#: includes/class-edd-cron.php:46 +#: includes/class-edd-cron.php:47 msgid "Once Weekly" msgstr "" @@ -13179,7 +13178,7 @@ msgstr "" #: includes/class-edd-discount.php:696 #: includes/gateways/stripe/includes/template-functions.php:377 -#: includes/misc-functions.php:1433 +#: includes/misc-functions.php:1453 msgid "Expired" msgstr "" @@ -13722,7 +13721,7 @@ msgstr "" #: includes/deprecated-functions.php:1445 #: includes/deprecated-functions.php:1591 #: includes/deprecated-functions.php:1667 -#: includes/emails/functions.php:59 +#: includes/emails/recapture.php:16 msgid "You do not have permission to do this." msgstr "" @@ -13738,7 +13737,7 @@ msgstr "" #. Translators: %1$s - Opening anchor tag, %2$s - The url to dismiss the ajax notice, %3$s - Complete the opening of the anchor tag, %4$s - Open span tag, %4$s - Close span tag #: includes/deprecated-functions.php:1499 -#: includes/emails/functions.php:151 +#: includes/emails/recapture.php:126 msgid "%1$s %2$s %3$s %4$s Dismiss this notice. %5$s" msgstr "" @@ -13897,12 +13896,12 @@ msgstr "" msgid "Pro-tip from our expert" msgstr "" -#: includes/emails/functions.php:110 +#: includes/emails/recapture.php:84 msgid "Something went wrong. Recapture for EDD was not installed correctly." msgstr "" #. Translators: %1$s - tag, %2$s - tag, %3$s - tag, %4$s - tag -#: includes/emails/functions.php:138 +#: includes/emails/recapture.php:113 msgid "%1$sRecover abandoned purchases like this one.%2$s %3$sTry Recapture for free%4$s." msgstr "" @@ -15945,22 +15944,22 @@ msgid "Unable to find Event" msgstr "" #. Translators: The charge ID from Stripe that is being refunded. -#: includes/gateways/stripe/includes/webhooks.php:92 +#: includes/gateways/stripe/includes/webhooks.php:105 msgid "Charge %s has been fully refunded in Stripe." msgstr "" #. Translators: The charge ID from Stripe that is being partially refunded. -#: includes/gateways/stripe/includes/webhooks.php:96 +#: includes/gateways/stripe/includes/webhooks.php:109 msgid "Charge %s partially refunded in Stripe." msgstr "" #. translators: %s Stripe Radar review opening reason. -#: includes/gateways/stripe/includes/webhooks.php:142 +#: includes/gateways/stripe/includes/webhooks.php:155 msgid "Stripe Radar review opened with a reason of %s." msgstr "" #. translators: %s Stripe Radar review closing reason. -#: includes/gateways/stripe/includes/webhooks.php:187 +#: includes/gateways/stripe/includes/webhooks.php:200 msgid "Stripe Radar review closed with a reason of %s." msgstr "" @@ -16011,31 +16010,31 @@ msgstr "" msgid "The %1$s hook is deprecated since Easy Digital Downloads version %2$s with no alternative available." msgstr "" -#: includes/misc-functions.php:1217 +#: includes/misc-functions.php:1237 msgid "Store Bot" msgstr "" -#: includes/misc-functions.php:1437 +#: includes/misc-functions.php:1457 msgid "Verified" msgstr "" -#: includes/misc-functions.php:1438 +#: includes/misc-functions.php:1458 msgid "Spam" msgstr "" -#: includes/misc-functions.php:1439 +#: includes/misc-functions.php:1459 msgid "Deleted" msgstr "" -#: includes/misc-functions.php:1440 +#: includes/misc-functions.php:1460 msgid "Cancelled" msgstr "" -#: includes/misc-functions.php:1554 +#: includes/misc-functions.php:1574 msgid "Please define default parameters in the form of an array." msgstr "" -#: includes/misc-functions.php:1559 +#: includes/misc-functions.php:1579 msgid "Please define an SVG icon filename." msgstr "" @@ -16065,7 +16064,7 @@ msgstr "" #. Translators: %1$s - type of amount being refunded (subtotal, tax, or total); %1$s - adjustment description; %3$s - maximum amount allowed for refund #: includes/orders/classes/class-refund-validator.php:390 -msgid "The maximum refund %s for the adjustment \"%s\" is %s." +msgid "The maximum refund %1$s for the adjustment \"%2$s\" is %3$s." msgstr "" #: includes/orders/functions/orders.php:665 @@ -17648,12 +17647,10 @@ msgstr "" msgid "Extension deactivated." msgstr "" -#. translators: %s is the name of the extension. #: src/Admin/Extensions/Legacy.php:45 msgid "%s is now part of EDD!" msgstr "" -#. translators: %s is the name of the extension. #: src/Admin/Extensions/Legacy.php:50 msgid "The functionality of %s has been merged into Easy Digital Downloads. It has been deactivated and you can safely delete the %s plugin." msgstr "" @@ -17718,63 +17715,63 @@ msgstr "" msgid "And more…" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:32 +#: src/Admin/Onboarding/Steps/Products.php:38 msgid "Product details" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:37 +#: src/Admin/Onboarding/Steps/Products.php:43 msgid "We'll get started with some basic information. Don't worry, you can add more details later. When you're finished here, the product will be saved as a draft so you can finish up later." msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:45 +#: src/Admin/Onboarding/Steps/Products.php:51 msgid "Product Name" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:57 +#: src/Admin/Onboarding/Steps/Products.php:63 msgid "Set image" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:57 +#: src/Admin/Onboarding/Steps/Products.php:63 msgid "Set Image" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:63 +#: src/Admin/Onboarding/Steps/Products.php:69 msgid "Pricing Options" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:67 +#: src/Admin/Onboarding/Steps/Products.php:73 msgid "Single price" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:68 +#: src/Admin/Onboarding/Steps/Products.php:74 msgid "Variable price" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:73 +#: src/Admin/Onboarding/Steps/Products.php:79 msgid "Product Price" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:127 +#: src/Admin/Onboarding/Steps/Products.php:141 msgid "Add your first file" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:136 +#: src/Admin/Onboarding/Steps/Products.php:150 msgid "Ready to add your first downloadable file to your product? Great! These files will be protected and only available to people who purchase your product. Not ready yet? No problem, you can always add and update files later." msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:152 +#: src/Admin/Onboarding/Steps/Products.php:166 msgid "Congratulations!" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:153 +#: src/Admin/Onboarding/Steps/Products.php:167 msgid "You've set up your store and your first product has been created." msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:154 +#: src/Admin/Onboarding/Steps/Products.php:168 msgid "Edit My Product" msgstr "" -#: src/Admin/Onboarding/Steps/Products.php:155 +#: src/Admin/Onboarding/Steps/Products.php:169 msgid "Explore Extensions" msgstr "" @@ -18929,7 +18926,7 @@ msgid "SKUs will be shown on purchase receipt and exported purchase histories." msgstr "" #: src/Admin/Settings/Tabs/Gateways.php:229 -msgid "Enable Sequental Numbering" +msgid "Enable Sequential Numbering" msgstr "" #: src/Admin/Settings/Tabs/Gateways.php:230 @@ -19005,7 +19002,7 @@ msgstr "" #. translators: %1$s: opening anchor tag, %2$s: closing anchor tag #: src/Admin/Settings/Tabs/Gateways.php:374 -msgid "Increase conversions by auto-filling address information for customers during checkout. To enable GeoLocation Dectection, %1$sUpgrade to Pro%2$s." +msgid "Increase conversions by auto-filling address information for customers during checkout. To enable GeoLocation Detection, %1$sUpgrade to Pro%2$s." msgstr "" #: src/Admin/Settings/Tabs/General.php:45 diff --git a/package.json b/package.json index 47478dc413..c3a1d52240 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "easy-digital-downloads", - "version": "3.2.11", + "version": "3.2.12", "description": "The easiest way to sell digital products with WordPress.", "private": true, "author": "Easy Digital Downloads", diff --git a/readme.txt b/readme.txt index 760aff0dfd..890f4c8eda 100755 --- a/readme.txt +++ b/readme.txt @@ -4,9 +4,9 @@ Plugin URI: https://easydigitaldownloads.com Contributors: easydigitaldownloads, am, cklosows, littlerchicken, achchu93, smub, mordauk, chriscct7, sumobi, SpencerFinnell, drewapicture, johnjamesjacoby, lisacee Tags: ecommerce, payments, sell, digital store, stripe Requires at least: 5.8 -Tested up to: 6.4 +Tested up to: 6.5 Requires PHP: 7.4 -Stable Tag: 3.2.11 +Stable Tag: 3.2.12 License: GNU Version 2 or Any Later Version The #1 eCommerce plugin to sell digital products & subscriptions. Accept credit card payments with Stripe & PayPal and start your store today. @@ -74,7 +74,7 @@ With the included date comparison tools, you can compare your sales, revenue, cu * File Downloads Protection - Your downloadable products are safe with Easy Digital Downloads. When a user purchases your product, we generate a secure and unique link that allows only your customers to download your files from your ecommerce site. * Email Receipts - The included email receipts are fully customizable to ensure that your brand is represented in your receipts. * Customer Management - Track your customer lifetime value and purchase history with the included Customer Management system. Quickly access a customer's entire purchase history, add notes, and link to WordPress users. -* Refund and Dispute Handling - With our accounting friendly store management system, refunds and disputes ensure that your records are accurate and customers only have access to files when they should. +* Refund and Dispute Handling - With our automated order management tools, EDD ensures that your records are accurate and customers only have access to files when they should. * Customer Profile Editor - Give your users to their purchase history and profile management with the included blocks. Extensible, adaptable, and open source -- Easy Digital Downloads is created with designers and developers in mind. With our extensive list of integrations as well as the included hooks and filters, the possibilities are endless. @@ -147,7 +147,7 @@ While nearly any theme will work with Easy Digital Downloads, we've worked with = Is there a sample import file I can use to setup a demo store? = -Yes! Simply go to Tools > Import and install the WordPress Importer, then you can use the XML file located at wp-content/plugins/easy-digital-downloads/assets/ and select the sample-products-import.xml file. This will create several sample products and plugin pages for you. +Yes! Simply go to Tools > Import and install the WordPress Importer, then you can use the sample-products-import.xml file located in wp-content/plugins/easy-digital-downloads/assets/. This will create several sample products and plugin pages for you. = Can I import all the products from my existing store into EDD? = @@ -224,11 +224,17 @@ Check out some of our popular posts for actionable advice for running your busin 8. Checkout - Default Theme == Changelog == -= 3.2.11 = -* Order Management: When searching orders, a Product ID was being erroneously added to the filter arguments when it not have been. += 3.2.12 = +* Compatibility: Fixed a conflict between Setup Wizard and the Multi-Currency extension. +* Stripe: Improved the handling of refunding charges via the Stripe Dashboard. +* Exports: Improved performance, management, and protection of export files generated by EDD. +* Emails: Improved the validation before installing the Recapture integration. View the full changelog at [https://easydigitaldownloads.com/changelogs/plugin/easy-digital-downloads/](https://easydigitaldownloads.com/changelogs/plugin/easy-digital-downloads/?utm_medium=readme&utm_source=wporg&utm_campaign=edd-plugin&utm_term=description) += 3.2.11 = +* Order Management: When searching orders, a Product ID was being erroneously added to the filter arguments when it not have been. + = 3.2.10 = * Downloads: Improved performance when creating and managing download directories. * Discounts: Start and End dates are properly handling the timezone. @@ -242,15 +248,15 @@ View the full changelog at [https://easydigitaldownloads.com/changelogs/plugin/e * HTML: The Product Dropdown could have an unexpected empty option in the list of options. * HTML: The Textarea HTML field could add empty content to the value. * Checkout: The Privacy Policy checkbox may not always show when expected. -* Blocks: Improved loading of Easy Digital Download blocks. -* Blocks: Improved the handling of Easy Digital Download blocks when using a classic theme. +* Blocks: Improved loading of Easy Digital Downloads blocks. +* Blocks: Improved the handling of Easy Digital Downloads blocks when using a classic theme. * Orders: Manually creating orders in the admin could fail to save the order due to a capability check. * Migration: Improved the reliability of the EDD 3.0+ migration routine for possibly corrupt serialized data. * Migration: Improved PHP 8.0+ compatibility for the EDD 3.0+ migration routine. = 3.2.9 = * Stripe: Resending the purchase receipt could fail if including the Stripe statement descriptor in the email template. -* Settings: Improve the reliability of determining the timezone settings in WordPress. +* Settings: Improved the reliability of determining the timezone settings in WordPress. * Reports: When using custom dates for reporting, some timezone settings could make the dates show incorrectly. * Emails: Adjusted when the deprecation notices will be shown for the legacy email hooks. @@ -389,7 +395,7 @@ View the full changelog at [https://easydigitaldownloads.com/changelogs/plugin/e * Fix: New PayPal Commerce subscriptions might not be correctly marked as complete. * Fix: EDD Blocks placeholder styles could interfere with WordPress Core placeholders. * Fix: Additional, not officially supported fee data is now stored as order adjustment metadata. -* Dev: Many filters and hooks that passed EDD_Payment objects now have a complimentary hook or filter that uses EDD\Orders\Order objects. +* Dev: Many filters and hooks that passed EDD_Payment objects now have a complementary hook or filter that uses EDD\Orders\Order objects. * Dev: Easy Digital Downloads is no longer registering the edd_payment and edd_discount post types. * Dev: Easy Digital Downloads – Core now holds the Stripe base code, and Stripe Pro 3.0.0 only contains pro features. * Dev: Code for old, unsupported versions of PHP has been removed. diff --git a/src/Admin/Onboarding/Steps/Products.php b/src/Admin/Onboarding/Steps/Products.php index bf87feacc7..1c5588057e 100644 --- a/src/Admin/Onboarding/Steps/Products.php +++ b/src/Admin/Onboarding/Steps/Products.php @@ -12,8 +12,11 @@ namespace EDD\Admin\Onboarding\Steps; // Exit if accessed directly. -defined( 'ABSPATH' ) || exit; +defined( 'ABSPATH' ) || exit; // @codeCoverageIgnore +/** + * Products step class. + */ class Products extends Step { /** @@ -22,7 +25,10 @@ class Products extends Step { * @since 3.1.1 */ public function step_html() { - $currency_position = edd_get_option( 'currency_position', 'before' ); + $currency_position = edd_get_option( 'currency_position', 'before' ); + // Remove all actions that may have been added by extensions. + remove_all_actions( 'edd_after_price_field' ); + remove_all_actions( 'edd_download_price_option_row' ); ?>
@@ -123,7 +129,15 @@ public function step_html() {
diff --git a/src/Admin/Settings/Tabs/Gateways.php b/src/Admin/Settings/Tabs/Gateways.php index 69944bc594..0b5f17b274 100644 --- a/src/Admin/Settings/Tabs/Gateways.php +++ b/src/Admin/Settings/Tabs/Gateways.php @@ -226,7 +226,7 @@ private function get_accounting_settings() { ), 'enable_sequential' => array( 'id' => 'enable_sequential', - 'name' => __( 'Enable Sequental Numbering', 'easy-digital-downloads' ), + 'name' => __( 'Enable Sequential Numbering', 'easy-digital-downloads' ), 'check' => __( 'Check this box to enable sequential order numbers.', 'easy-digital-downloads' ), 'desc' => __( 'Does not impact previous orders. Future orders will be sequential.', 'easy-digital-downloads' ), 'type' => 'checkbox_description', @@ -371,7 +371,7 @@ private function get_geolocation_description() { return sprintf( /* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */ - __( 'Increase conversions by auto-filling address information for customers during checkout. To enable GeoLocation Dectection, %1$sUpgrade to Pro%2$s.', 'easy-digital-downloads' ), + __( 'Increase conversions by auto-filling address information for customers during checkout. To enable GeoLocation Detection, %1$sUpgrade to Pro%2$s.', 'easy-digital-downloads' ), '', '' );