From 0763615b153c6e3103c39af565938930b123b8ab Mon Sep 17 00:00:00 2001 From: Sebastian Pape <0xneo11@gmail.com> Date: Wed, 27 Nov 2024 09:07:05 +0100 Subject: [PATCH] v2.12.9: fix redirect to payment page if signup during checkout is enabled --- changelog.txt | 3 +++ depay-woocommerce-payments.php | 4 ++-- includes/class-depay-wc-payments-gateway.php | 4 ++-- languages/depay-woocommerce-payments.pot | 2 +- package.json | 2 +- readme.txt | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/changelog.txt b/changelog.txt index 503cc75..cd733fa 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ *** DePay Web3 Payments for WooCommerce Changelog *** +2024-11-27 - version 2.12.9 +* fix redirect to payment page if signup during checkout is enabled + 2024-11-27 - version 2.12.8 * fixes checkout issues when users are creating accounts during checkout diff --git a/depay-woocommerce-payments.php b/depay-woocommerce-payments.php index 4c60878..1cf92bf 100644 --- a/depay-woocommerce-payments.php +++ b/depay-woocommerce-payments.php @@ -11,7 +11,7 @@ * WC tested up to: 8.7.0 * Requires at least: 5.8 * Requires PHP: 7.0 - * Version: 2.12.8 + * Version: 2.12.9 * * @package DePay\Payments */ @@ -21,7 +21,7 @@ define( 'DEPAY_WC_PLUGIN_FILE', __FILE__ ); define( 'DEPAY_WC_ABSPATH', __DIR__ . '/' ); define( 'DEPAY_MIN_WC_ADMIN_VERSION', '0.23.2' ); -define( 'DEPAY_CURRENT_VERSION', '2.12.8' ); +define( 'DEPAY_CURRENT_VERSION', '2.12.9' ); require_once DEPAY_WC_ABSPATH . '/vendor/autoload.php'; diff --git a/includes/class-depay-wc-payments-gateway.php b/includes/class-depay-wc-payments-gateway.php index 2d8a214..0d99a77 100644 --- a/includes/class-depay-wc-payments-gateway.php +++ b/includes/class-depay-wc-payments-gateway.php @@ -90,10 +90,10 @@ public function process_payment( $order_id ) { DePay_WC_Payments::log( 'Storing checkout failed: ' . $error_message ); throw new Exception( 'Storing checkout failed: ' . $error_message ); } - + return( [ 'result' => 'success', - 'redirect' => '#wc-depay-checkout-' . $checkout_id . '@' . time() + 'redirect' => get_option('woocommerce_enable_signup_and_login_from_checkout') === 'yes' ? $order->get_checkout_payment_url() . '#wc-depay-checkout-' . $checkout_id . '@' . time() : '#wc-depay-checkout-' . $checkout_id . '@' . time() ] ); } else { $order->payment_complete(); diff --git a/languages/depay-woocommerce-payments.pot b/languages/depay-woocommerce-payments.pot index 041c812..b09eb78 100644 --- a/languages/depay-woocommerce-payments.pot +++ b/languages/depay-woocommerce-payments.pot @@ -2,7 +2,7 @@ # This file is distributed under the same license as the package. msgid "" msgstr "" -"Project-Id-Version: DePay WooCommerce Payments 2.12.8\n" +"Project-Id-Version: DePay WooCommerce Payments 2.12.9\n" "Report-Msgid-Bugs-To: " "support@depay.com\n" "MIME-Version: 1.0\n" diff --git a/package.json b/package.json index d291eda..bcacf9c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@depay/web3-woocommerce-depay-payments", "moduleName": "WooCommerceDePayPayments", - "version": "2.12.8", + "version": "2.12.9", "description": "WooCommerce DePay plugin to accept Web3 payments directly into your wallet with on-the-fly conversion.", "main": "./dist/umd/index.js", "module": "./dist/esm/index.js", diff --git a/readme.txt b/readme.txt index f6cdba9..47d3663 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: web3, payments, woocommerce, depay, cryptocurrency Requires at least: 6.0 Tested up to: 6.5 Requires PHP: 7.2 -Stable tag: 2.12.8 +Stable tag: 2.12.9 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html