Update delivery process fields and sample form
This commit is contained in:
@@ -61,7 +61,7 @@ class Wiaas_Order {
|
||||
);
|
||||
|
||||
$order = wc_get_order($order_id);
|
||||
$order->update_meta_data('_wiaas_suppliers', $suppliers);
|
||||
$order->update_meta_data('_wiaas_delivery_suppliers', $suppliers);
|
||||
$order->save_meta_data();
|
||||
return true;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class Wiaas_Order {
|
||||
|
||||
|
||||
$order = wc_get_order($order_id);
|
||||
$order->update_meta_data('_wiaas_suppliers', $suppliers);
|
||||
$order->update_meta_data('_wiaas_delivery_suppliers', $suppliers);
|
||||
$order->save_meta_data();
|
||||
return true;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ class Wiaas_Order {
|
||||
unset($suppliers[$key]['tracking_info'][$tracking_index]);
|
||||
|
||||
$order = wc_get_order($order_id);
|
||||
$order->update_meta_data('_wiaas_suppliers', $suppliers);
|
||||
$order->update_meta_data('_wiaas_delivery_suppliers', $suppliers);
|
||||
$order->save_meta_data();
|
||||
return true;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ class Wiaas_Order {
|
||||
}
|
||||
|
||||
public static function save_estimated_date($order_id, $supplier_id, $date){
|
||||
$suppliers = wiaas_get_order_delivery_suppliers($order_id);
|
||||
$suppliers = self::get_suppliers($order_id);
|
||||
$updated = false;
|
||||
foreach($suppliers as $key => $supplier){
|
||||
if ($supplier['id'] === $supplier_id){
|
||||
@@ -120,7 +120,7 @@ class Wiaas_Order {
|
||||
|
||||
$order = wc_get_order($order_id);
|
||||
|
||||
$order->update_meta_data('_wiaas_suppliers', $suppliers);
|
||||
$order->update_meta_data('_wiaas_delivery_suppliers', $suppliers);
|
||||
self::_update_max_and_earliest_dates($order, $suppliers);
|
||||
|
||||
$order->save_meta_data();
|
||||
@@ -129,7 +129,7 @@ class Wiaas_Order {
|
||||
|
||||
public static function save_confirmed_date($order_id, $supplier_id, $date){
|
||||
|
||||
$suppliers = wiaas_get_order_delivery_suppliers($order_id);
|
||||
$suppliers = self::get_suppliers($order_id);
|
||||
$updated = false;
|
||||
|
||||
foreach($suppliers as $key => $supplier){
|
||||
@@ -148,7 +148,7 @@ class Wiaas_Order {
|
||||
|
||||
$order = wc_get_order($order_id);
|
||||
|
||||
$order->update_meta_data('_wiaas_suppliers', $suppliers);
|
||||
$order->update_meta_data('_wiaas_delivery_suppliers', $suppliers);
|
||||
self::_update_max_and_earliest_dates($order, $suppliers);
|
||||
|
||||
$order->save_meta_data();
|
||||
@@ -201,7 +201,7 @@ class Wiaas_Order {
|
||||
*/
|
||||
public static function get_suppliers($order_id){
|
||||
$order = wc_get_order($order_id);
|
||||
return $order->get_meta('_wiaas_suppliers');
|
||||
return $order->get_meta('_wiaas_delivery_suppliers');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user