diff --git a/CHANGELOG.md b/CHANGELOG.md index 628e5ed..d807679 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2024-01-31 4.7.2 +* Fixed error with send address by history + ## 2024-01-30 4.7.1 * Fixed the error of displaying the 'Add' button to mapping custom fields diff --git a/VERSION b/VERSION index 7c66fca..af9764a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.7.1 +4.7.2 diff --git a/src/include/class-wc-retailcrm-history.php b/src/include/class-wc-retailcrm-history.php index b6b8471..6b4c14c 100644 --- a/src/include/class-wc-retailcrm-history.php +++ b/src/include/class-wc-retailcrm-history.php @@ -765,7 +765,7 @@ if (!class_exists('WC_Retailcrm_History')) : } $shippingAddress = $order['delivery']['address']; - $shippingAddressLines = $this->getAddressLines($shippingAddress['text']); + $shippingAddressLines = $this->getAddressLines($shippingAddress['text'] ?? ''); $addressShipping = [ 'first_name' => $order['firstName'] ?? '', @@ -779,7 +779,7 @@ if (!class_exists('WC_Retailcrm_History')) : 'country' => $shippingAddress['countryIso'] ?? '' ]; - $billingAddressLines = $this->getAddressLines($billingAddress['text']); + $billingAddressLines = $this->getAddressLines($billingAddress['text'] ?? ''); $addressBilling = [ 'first_name' => $contactOrCustomer['firstName'] ?? '', @@ -1083,14 +1083,14 @@ if (!class_exists('WC_Retailcrm_History')) : /** * Returns data for address_1 and address_2(if exist data for this field) for WC order. * - * @param string|null $addressLine + * @param string $addressLine * - * @return mixed + * @return array|string */ private function getAddressLines($addressLine) { - if ($addressLine === null) { - return null; + if ($addressLine === '') { + return ''; } if (strpos($addressLine, WC_Retailcrm_Abstracts_Address::ADDRESS_LINE_DIVIDER) !== false) { diff --git a/src/readme.txt b/src/readme.txt index e7fdb9d..6c087ec 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.4 -Stable tag: 4.7.1 +Stable tag: 4.7.2 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.7.2 = +* Fixed error with send address by history + = 4.7.1 = * Fixed the error of displaying the 'Add' button to mapping custom fields diff --git a/src/retailcrm.php b/src/retailcrm.php index cd7439c..a276469 100644 --- a/src/retailcrm.php +++ b/src/retailcrm.php @@ -5,10 +5,10 @@ * Description: Integration plugin for WooCommerce & Simla.com * Author: RetailDriver LLC * Author URI: http://retailcrm.pro/ - * Version: 4.7.1 + * Version: 4.7.2 * Tested up to: 6.4 * WC requires at least: 5.4 - * WC tested up to: 8.3 + * WC tested up to: 8.5 * Text Domain: retailcrm */ diff --git a/src/uninstall.php b/src/uninstall.php index 4acd69e..b40af8a 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.7.1 + * @version 4.7.2 * * @package RetailCRM */