diff --git a/src/include/class-wc-retailcrm-history.php b/src/include/class-wc-retailcrm-history.php index 52a4862..064b77f 100644 --- a/src/include/class-wc-retailcrm-history.php +++ b/src/include/class-wc-retailcrm-history.php @@ -343,14 +343,14 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) : $wcOrder->update_status($options[$order['status']]); } - if (isset($order['customerComment'])) { - $wcOrder->set_customer_note($order['customerComment']); - } - if (isset($order['managerComment']) && !empty($order['managerComment'])) { $wcOrder->add_order_note($order['managerComment'], 0, false); } + if (isset($order['customerComment']) && !empty($order['customerComment'])) { + $wcOrder->set_customer_note($order['customerComment']); + } + if (isset($order['firstName'])) { $wcOrder->set_shipping_first_name($order['firstName']); } @@ -663,6 +663,10 @@ if ( ! class_exists( 'WC_Retailcrm_History' ) ) : $wcOrder->add_order_note($order['managerComment'], 0, false); } + if (isset($order['customerComment']) && !empty($order['customerComment'])) { + $wcOrder->set_customer_note($order['customerComment']); + } + // TODO Check if that works; also don't forget to set this company field while creating order from CMS! if ($this->retailcrm->getCorporateEnabled() && self::isOrderCorporate($order)