WC_Product::set_brand_ids │ public │ WC 10.3.0

Set the product brands.

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

Хуков нет.

Возвращает

void. Ничего (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 11.1.2

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