Tests
This commit is contained in:
parent
55b1eac5bd
commit
a9460ef4a8
4 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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)]
|
||||
);
|
||||
|
|
|
@ -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)]
|
||||
);
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Reference in a new issue