Added check of order status when updating it
This commit is contained in:
parent
48c680c420
commit
4b42003cd2
1 changed files with 5 additions and 0 deletions
|
@ -330,6 +330,11 @@ if (!class_exists('WC_Retailcrm_Orders')) :
|
|||
|
||||
try {
|
||||
$wcOrder = wc_get_order($orderId);
|
||||
|
||||
if ($wcOrder->get_status() === 'checkout-draft') {
|
||||
return null;
|
||||
}
|
||||
|
||||
WC_Retailcrm_Logger::info(
|
||||
__METHOD__,
|
||||
'Update WC_Order ' . $wcOrder->get_id(),
|
||||
|
|
Loading…
Add table
Reference in a new issue