1
0
Fork 0
mirror of synced 2025-04-02 21:36:14 +03:00
This commit is contained in:
Alex Komarichev 2024-09-18 19:37:15 +03:00
parent 55b1eac5bd
commit a9460ef4a8
4 changed files with 4 additions and 4 deletions

View file

@ -217,7 +217,7 @@ if (!class_exists('WC_Retailcrm_Logger') && class_exists('WC_Log_Levels')) :
];
}
return method_exists($object, 'get_data') ? (array_filter($object->get_data())) : $object;
return method_exists($object, 'get_data') ? (array_filter($object->get_data())) : [$object];
}
}
endif;

View file

@ -35,7 +35,7 @@ class WC_Retailcrm_Customer_Address extends WC_Retailcrm_Abstracts_Address
} else {
WC_Retailcrm_Logger::error(
__METHOD__,
sprintf('Error: Customer %s address is empty', $customer->getId()),
'Error: Customer address is empty',
null,
['wc_customer' => WC_Retailcrm_Logger::formatWCObject($customer)]
);

View file

@ -53,7 +53,7 @@ class WC_Retailcrm_Customer_Corporate_Address extends WC_Retailcrm_Abstracts_Add
} else {
WC_Retailcrm_Logger::error(
__METHOD__,
sprintf('Error: Corporate Customer %s address is empty.', $customer->get_id()),
'Error: Corporate Customer address is empty.',
null,
['wc_customer' => WC_Retailcrm_Logger::formatWCObject($customer)]
);

View file

@ -65,7 +65,7 @@ class WC_Retailcrm_Customer_Switcher_Result
{
WC_Retailcrm_Logger::info(
__METHOD__,
sprintf('Saving WC_Customer %s and WC_Order %s', $this->wcCustomer->get_id(), $this->wcOrder->get_id()),
'Saving WC_Customer and WC_Order',
null,
[
'wc_customer' => WC_Retailcrm_Logger::formatWCObject($this->wcCustomer),