Removed error logs
This commit is contained in:
@@ -62,7 +62,7 @@ class Wiaas_Admin_Supplier_Orders {
|
||||
$user_organisation_id = Wiaas_User_Organization::get_user_organization_id(wp_get_current_user()->ID);
|
||||
|
||||
$items = array();
|
||||
error_log('Filtering');
|
||||
|
||||
foreach ($order_items as $key => $order_item) {
|
||||
|
||||
$product = wc_get_product($order_item->get_product_id());
|
||||
|
||||
@@ -71,15 +71,11 @@ class Wiaas_Product_Supplier {
|
||||
* @return int organization_id
|
||||
*/
|
||||
public static function get_supplier_organisation_id_from_product($product_id) {
|
||||
error_log( '$product_id: '.$product_id);
|
||||
|
||||
$supplier_terms = wp_get_object_terms($product_id, 'supplier');
|
||||
error_log( '$supplier_terms: '.$supplier_terms);
|
||||
$supplier_organisation_slug = $supplier_terms[0]->slug;
|
||||
error_log( '$supplier_org_slug'.$supplier_organisation_slug);
|
||||
$supplier_organisation_id = get_term_by('slug', $supplier_organisation_slug, 'wiaas-user-organization')->term_id;
|
||||
|
||||
error_log( '$supplier_organisation id: '.$supplier_organisation_id);
|
||||
return $supplier_organisation_id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user