WC_Product::set_brand_idspublicWC 10.3.0

Set the product brands.

Метод класса: WC_Product{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WC_Product = new WC_Product();
$WC_Product->set_brand_ids( $term_ids );
$term_ids(массив) (обязательный)
List of terms IDs.

Список изменений

С версии 10.3.0 Введена.

Код WC_Product::set_brand_ids() WC 10.3.4

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