use taxonomy for supplier id
This commit is contained in:
@@ -72,7 +72,7 @@ class Wiaas_Product {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function get_supplier_id($product_id){
|
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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user