WordPress at Your Fingertips
function is not described

WC_Product::set_featured() public WC 3.0.0

Set if the product is featured.

{} It's a method of the class: WC_Product{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_featured( $featured );
$featured(true|false|string) (required)
Whether the product is featured or not.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_featured() WC 5.8.0

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