WC_Product::set_brand_ids
Set the product brands.
Method of the class: WC_Product{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Product = new WC_Product(); $WC_Product->set_brand_ids( $term_ids );
- $term_ids(array) (required)
- List of terms IDs.
Changelog
| Since 10.3.0 | Introduced. |
WC_Product::set_brand_ids() WC Product::set brand ids code WC 10.3.6
public function set_brand_ids( $term_ids ) {
$this->set_prop( 'brand_ids', array_unique( array_map( 'intval', $term_ids ) ) );
}