1
0
Fork 0
mirror of synced 2025-04-06 07:13:33 +03:00

Дополнительное логгирование для ordersCreate

This commit is contained in:
Pavel 2019-07-11 17:30:23 +03:00
parent 1fb010e421
commit 03ea0c08c6

View file

@ -128,7 +128,15 @@ if ( ! class_exists( 'WC_Retailcrm_Orders' ) ) :
$order = wc_get_order($order_id);
$this->processOrder($order);
$customer = $order->get_user();
$logger = new WC_Logger();
$logger->add('retailcrm', \sprintf(
'Order: %s\nCustomer: %s\nBilling E-Mail: %s\n',
print_r($order, true),
print_r($customer, true),
print_r($order->get_billing_email(), true)
));
if ($customer != false) {
$search = $this->customers->searchCustomer(array('id' => $customer->get('ID')));