use taxonomy for supplier id

This commit is contained in:
Bilal Catic
2018-11-01 20:19:35 +01:00
parent f8e3cc5875
commit c08c393b2d

View File

@@ -72,7 +72,7 @@ class Wiaas_Product {
}
public static function get_supplier_id($product_id){
return get_field('supplier', $product_id) ?: NULL;
return wp_get_post_terms($product_id, 'supplier', array('fields' => 'ids'))[0];
}
}