WC_Product::set_featured()publicWC 3.0.0

Set if the product is featured.

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

Хуков нет.

Возвращает

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

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

$WC_Product = new WC_Product();
$WC_Product->set_featured( $featured );
$featured(true|false|строка) (обязательный)
Whether the product is featured or not.

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

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

Код WC_Product::set_featured() WC 8.7.0

public function set_featured( $featured ) {
	$this->set_prop( 'featured', wc_string_to_bool( $featured ) );
}