1
0
mirror of synced 2025-02-20 08:53:14 +03:00

ref #94134 Fixed error with send address by history (#321)

This commit is contained in:
Uryvskiy Dima 2024-01-31 13:01:47 +03:00 committed by GitHub
parent 55a154da83
commit f32fb6a4c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 11 deletions

View File

@ -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

View File

@ -1 +1 @@
4.7.1
4.7.2

View File

@ -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) {

View File

@ -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

View File

@ -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
*/

View File

@ -16,7 +16,7 @@
*
* @link https://wordpress.org/plugins/woo-retailcrm/
*
* @version 4.7.1
* @version 4.7.2
*
* @package RetailCRM
*/