1
0
Fork 0
mirror of synced 2025-04-02 21:36:14 +03:00

Use billing phone if shipping phone not exist

This commit is contained in:
Alex Komarichev 2024-09-17 13:31:22 +03:00
parent 797ac06cbb
commit ad67bee267

View file

@ -180,7 +180,8 @@ if (!class_exists('WC_Retailcrm_Logger') && class_exists('WC_Log_Levels')) :
"state" => $object->get_shipping_state(),
"postcode" => $object->get_shipping_postcode(),
"country" => $object->get_shipping_country(),
"phone" => $object->get_shipping_phone()
"phone" => method_exists($object, 'get_shipping_phone')
? $object->get_shipping_phone() : $object->get_billing_phone(),
],
'email' => $object->get_billing_email(),
'payment_method_title' => $object->get_payment_method_title(),
@ -205,7 +206,8 @@ if (!class_exists('WC_Retailcrm_Logger') && class_exists('WC_Log_Levels')) :
"state" => $object->get_shipping_state(),
"postcode" => $object->get_shipping_postcode(),
"country" => $object->get_shipping_country(),
"phone" => $object->get_shipping_phone()
"phone" => method_exists($object, 'get_shipping_phone')
? $object->get_shipping_phone() : $object->get_billing_phone(),
],
]);
}