fix send empty order number
This commit is contained in:
parent
65ee374c94
commit
d8bbbc2d8a
@ -97,11 +97,18 @@ class WC_Retailcrm_Order extends WC_Retailcrm_Abstracts_Data
|
||||
*/
|
||||
protected function set_number($order)
|
||||
{
|
||||
if ($this->is_new) {
|
||||
$this->set_data_field('number', $order->get_order_number());
|
||||
}
|
||||
|
||||
if (isset($this->settings['update_number'])
|
||||
&& $this->settings['update_number'] == WC_Retailcrm_Base::YES
|
||||
&& !$this->is_new
|
||||
) {
|
||||
$this->set_data_field('number', $order->get_order_number());
|
||||
if (!$this->is_new) {
|
||||
$this->set_data_field('number', $order->get_order_number());
|
||||
}
|
||||
} elseif (!$this->is_new) {
|
||||
unset($this->data['number']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user