1
0
Fork 0
mirror of synced 2025-04-06 07:13:33 +03:00

proper variables initialization

This commit is contained in:
Pavel 2020-02-17 11:35:56 +03:00 committed by Павел
parent 0bc823e596
commit e9514ea20e
2 changed files with 11 additions and 4 deletions

View file

@ -9,7 +9,9 @@
}
],
"minimum-stability": "dev",
"require": {},
"require": {
"ext-simplexml": "*"
},
"require-dev": {
"ext-json": "*",
"ext-mbstring": "*",

View file

@ -504,9 +504,9 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) :
}
/**
* @param $item
* @param $order_item
* @param $order_item_id
* @param array $item
* @param \WC_Order_Item $order_item
* @param string $order_item_id
*
* @throws \Exception
*/
@ -648,6 +648,8 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) :
if ($product_data) {
foreach ($product_data as $key => $product) {
$arItemsNew = array();
$arItemsOld = array();
$item = retailcrm_get_wc_product($product['offer'][$this->bind_field], $this->retailcrm_settings);
if (!$item) {
@ -818,8 +820,11 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) :
*/
public static function assemblyOrder($orderHistory)
{
$fields = array();
if (file_exists(__DIR__ . '/../config/objects.xml')) {
$objects = simplexml_load_file(__DIR__ . '/../config/objects.xml');
foreach($objects->fields->field as $object) {
$fields[(string)$object["group"]][(string)$object["id"]] = (string)$object;
}