From 1d097eda6f1bbd38b77ab7f8ab5b5e2fdc0da260 Mon Sep 17 00:00:00 2001 From: Almira Krdzic Date: Sun, 4 Nov 2018 19:54:43 +0100 Subject: [PATCH] Get supplier organization from order item --- .../class-wiaas-delivery-process-step-assignee.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step-assignee.php b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step-assignee.php index 2debd3b..876c924 100644 --- a/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step-assignee.php +++ b/backend/app/plugins/wiaas/includes/delivery-process/class-wiaas-delivery-process-step-assignee.php @@ -100,10 +100,7 @@ class Wiaas_Delivery_Process_Step_Assignee { $item = $order->get_item($item_id); - $product_id = $item['product_id']; - - //TODO: Get this value from order since product can get changed or deleted later - $organization_id = Wiaas_Product_Supplier::get_supplier_organisation_id_from_product($product_id); + $organization_id = $item['wiaas_supplier_organization_id']; $user_ids = wiaas_get_organization_user_ids($organization_id);