WC_Product::set_brand_idspublicWC 10.3.0

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() code WC 10.3.6

public function set_brand_ids( $term_ids ) {
	$this->set_prop( 'brand_ids', array_unique( array_map( 'intval', $term_ids ) ) );
}