WC_Product::set_featured()
Set if the product is featured.
Method of the class: WC_Product{}
No Hooks.
Return
null
. Nothing (null).
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. |
WC_Product::set_featured() WC Product::set featured code WC 8.7.0
public function set_featured( $featured ) { $this->set_prop( 'featured', wc_string_to_bool( $featured ) ); }