From e114bc5e3ccf7822e4a05f3f99315e59748f6da9 Mon Sep 17 00:00:00 2001 From: joyet-simon <43644110+joyet-simon@users.noreply.github.com> Date: Mon, 16 Dec 2024 08:16:30 +0000 Subject: [PATCH 1/3] chore: update version --- CHANGELOG.md | 6 ++++++ README.md | 2 +- readme.txt | 8 +++++++- src/alma-gateway-for-woocommerce.php | 4 ++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bd3a6d2..fef0cd6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v5.8.1 - 2024-12-16 + +### 🐛 Bug Fixes + +Hotfix: compatibility for Woocommerce version 6.1.0 + ## v5.8.0 - 2024-12-12 ### Changes diff --git a/README.md b/README.md index 2f47785b..a0375117 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - Tested up to Wordpress: 6.6.1 - Tested up to Woocommerce: 9.2.3 - Requires PHP: 5.6 -- Stable tag: 5.8.0 +- Stable tag: 5.8.1 - License: GPLv3 - License URI: https://www.gnu.org/licenses/gpl-3.0.html - Support: support@getalma.eu diff --git a/readme.txt b/readme.txt index 953c76aa..efc3861f 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: payments, BNPL, woocommerce, ecommerce, e-commerce, payment gateway, sell, Requires at least: 4.4 Tested up to: 6.3 Requires PHP: 5.6 -Stable tag: 5.8.0 +Stable tag: 5.8.1 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -51,6 +51,12 @@ You can find more documentation on our [website](https://docs.almapay.com/docs/w == Changelog == +## v5.8.1 - 2024-12-16 + +### 🐛 Bug Fixes + +Hotfix: compatibility for Woocommerce version 6.1.0 + ## v5.8.0 - 2024-12-12 ### Changes diff --git a/src/alma-gateway-for-woocommerce.php b/src/alma-gateway-for-woocommerce.php index 260d5fc6..44439ff0 100644 --- a/src/alma-gateway-for-woocommerce.php +++ b/src/alma-gateway-for-woocommerce.php @@ -3,7 +3,7 @@ * Plugin Name: Alma - Pay in installments or later for WooCommerce * Plugin URI: https://docs.almapay.com/docs/woocommerce * Description: Install Alma and boost your sales! It's simple and guaranteed, your cash flow is secured. 0 commitment, 0 subscription, 0 risk. - * Version: 5.8.0 + * Version: 5.8.1 * Author: Alma * Author URI: https://almapay.com * License: GNU General Public License v3.0 @@ -40,7 +40,7 @@ } if ( ! defined( 'ALMA_VERSION' ) ) { - define( 'ALMA_VERSION', '5.8.0' ); + define( 'ALMA_VERSION', '5.8.1' ); } if ( ! defined( 'ALMA_PLUGIN_FILE' ) ) { define( 'ALMA_PLUGIN_FILE', __FILE__ ); From 2cddd8673d0a35d6cab4a1581905842fc1dd5c63 Mon Sep 17 00:00:00 2001 From: joyet simon <43644110+joyet-simon@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:11:50 +0100 Subject: [PATCH 2/3] hotfix: use class_exists --- src/alma-gateway-for-woocommerce.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/alma-gateway-for-woocommerce.php b/src/alma-gateway-for-woocommerce.php index 44439ff0..3e4f324b 100644 --- a/src/alma-gateway-for-woocommerce.php +++ b/src/alma-gateway-for-woocommerce.php @@ -33,8 +33,6 @@ * along with Alma Payment Gateway for WooCommerce. If not, see https://www.gnu.org/licenses/gpl-3.0.html. */ -use Automattic\WooCommerce\Utilities\FeaturesUtil; - if ( ! defined( 'ABSPATH' ) ) { die( 'Not allowed' ); // Exit if accessed directly. } @@ -92,6 +90,9 @@ function () { } ); +/** + * Init custom_order_tables if available in Woocommerce version. + */ add_action( 'before_woocommerce_init', function () { @@ -101,7 +102,7 @@ function () { * * @psalm-suppress UndefinedClass */ - FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); } } ); From e23c3694a6c6383e6d912cceb988cd705b2f311e Mon Sep 17 00:00:00 2001 From: joyet simon <43644110+joyet-simon@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:24:31 +0100 Subject: [PATCH 3/3] chore: update changelog --- CHANGELOG.md | 2 +- readme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fef0cd6d..b1acbabc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### 🐛 Bug Fixes -Hotfix: compatibility for Woocommerce version 6.1.0 +Hotfix: compatibility for Woocommerce version under 6.1.0 ## v5.8.0 - 2024-12-12 diff --git a/readme.txt b/readme.txt index efc3861f..0a752bd8 100644 --- a/readme.txt +++ b/readme.txt @@ -55,7 +55,7 @@ You can find more documentation on our [website](https://docs.almapay.com/docs/w ### 🐛 Bug Fixes -Hotfix: compatibility for Woocommerce version 6.1.0 +Hotfix: compatibility for Woocommerce version under 6.1.0 ## v5.8.0 - 2024-12-12