From d63c8d43095a8ef23017063a23e99c639628b495 Mon Sep 17 00:00:00 2001 From: Jacek Pyziak Date: Mon, 14 Jul 2025 14:58:34 +0200 Subject: [PATCH] =?UTF-8?q?Dodanie=20sprawdzenia=20statusu=20zam=C3=B3wien?= =?UTF-8?q?ia=20przed=20aktualizacj=C4=85=20w=20funkcji=20synchronizacji?= =?UTF-8?q?=20zam=C3=B3wie=C5=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cron.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cron.php b/cron.php index ad08ca0..dc10328 100644 --- a/cron.php +++ b/cron.php @@ -710,7 +710,10 @@ if ( $apilo_settings['enabled'] and $apilo_settings['sync_orders'] and $apilo_se $shop_status_id = \front\factory\ShopStatuses::get_shop_status_by_integration_status_id( 'apilo', $responseData['status'] ); $order_tmp = new Order( $order['id'] ); - $order_tmp -> update_status( $shop_status_id, false ); + + if ( $shop_status_id ) + $order_tmp -> update_status( $shop_status_id, false ); + $order_tmp -> update_aplio_order_status_date( date( 'Y-m-d H:i:s' ) ); echo '

Zaktualizowałem status zamówienia ' . $order['number'] . '

'; }