From 92a5673614eac430f5d49d191108c17147bdaf82 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Tue, 3 Mar 2020 10:24:43 +0300 Subject: [PATCH] fix for php5.3 --- src/include/class-wc-retailcrm-history.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/include/class-wc-retailcrm-history.php b/src/include/class-wc-retailcrm-history.php index 17612d7..ff732ea 100644 --- a/src/include/class-wc-retailcrm-history.php +++ b/src/include/class-wc-retailcrm-history.php @@ -358,9 +358,6 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) : $order['items'][$key]['woocomerceId'] = $result; } else { foreach ($wc_order->get_items() as $order_item_id => $order_item) { - - - if ($order_item['variation_id'] != 0 ) { $offer_id = $order_item['variation_id']; } else { @@ -671,7 +668,7 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) : */ protected function editOrder($settings, $wc_order, $order, $event = 'create') { - $order_items = []; + $order_items = array(); if ($event == 'update') { $result = $this->retailcrm->ordersGet($order['externalId']); if ($result->isSuccessful()) { @@ -703,10 +700,10 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) : } if (!empty($order_items)) { - $orderEdit = [ + $orderEdit = array( 'id' => $order['id'], 'items' => $order_items, - ]; + ); $this->retailcrm->ordersEdit($orderEdit, 'id'); }