WC_Product::set_price()
Set the product's active price.
Method of the class: WC_Product{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Product = new WC_Product(); $WC_Product->set_price( $price );
- $price(string) (required)
- Price.
WC_Product::set_price() WC Product::set price code WC 9.3.3
public function set_price( $price ) { $this->set_prop( 'price', wc_format_decimal( $price ) ); }