From 6c08749e8b50d8d6f423f0b4e63dd45e6c87e245 Mon Sep 17 00:00:00 2001 From: Kocmonavtik <61938582+Kocmonavtik@users.noreply.github.com> Date: Mon, 13 Mar 2023 11:37:44 +0300 Subject: [PATCH] ref #88434 fix display payment methods (#298) --- CHANGELOG.md | 3 +++ VERSION | 2 +- .../class-wc-retailcrm-abstracts-settings.php | 11 ++++++++--- src/readme.txt | 5 ++++- src/retailcrm.php | 2 +- src/uninstall.php | 2 +- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4932db5..b592af3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2023-03-02 4.5.4 +* Fix display payment methods + ## 2022-12-26 4.5.3 * Fix bug with products tax diff --git a/VERSION b/VERSION index ae6e65b..d01c9f6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.5.3 \ No newline at end of file +4.5.4 \ No newline at end of file diff --git a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php index dfa3ba6..5bc546c 100644 --- a/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php +++ b/src/include/abstracts/class-wc-retailcrm-abstracts-settings.php @@ -280,15 +280,20 @@ abstract class WC_Retailcrm_Abstracts_Settings extends WC_Integration ]; } - foreach ($wc_payment->payment_gateways() as $payment) { + foreach ($wc_payment->get_available_payment_gateways() as $payment) { + $title = empty($payment->method_title) ? $payment->id : $payment->method_title; + $description = empty($payment->method_description) + ? $payment->description + : $payment->method_description; + $this->form_fields[$payment->id] = [ 'css' => 'min-width:350px;', 'type' => 'select', - 'title' => __($payment->method_title, 'woocommerce'), + 'title' => __($title, 'woocommerce'), 'class' => 'select', 'options' => $paymentsList, 'desc_tip' => true, - 'description' => __($payment->method_description, 'woocommerce'), + 'description' => __($description, 'woocommerce'), ]; } } diff --git a/src/readme.txt b/src/readme.txt index 8ab01a3..6e16b07 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla Requires PHP: 7.0 Requires at least: 5.3 Tested up to: 6.0 -Stable tag: 4.5.3 +Stable tag: 4.5.4 License: GPLv1 or later License URI: http://www.gnu.org/licenses/gpl-1.0.html @@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == += 4.5.4 = +* Fix display payment methods + = 4.5.3 = * Fix bug with products tax diff --git a/src/retailcrm.php b/src/retailcrm.php index adcd1fc..0207c47 100644 --- a/src/retailcrm.php +++ b/src/retailcrm.php @@ -5,7 +5,7 @@ * Description: Integration plugin for WooCommerce & Simla.com * Author: RetailDriver LLC * Author URI: http://retailcrm.pro/ - * Version: 4.5.3 + * Version: 4.5.4 * Tested up to: 6.0 * WC requires at least: 5.4 * WC tested up to: 6.9 diff --git a/src/uninstall.php b/src/uninstall.php index 585f4cb..fe81833 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.5.3 + * @version 4.5.4 * * @package RetailCRM */