WC_Product::set_regular_price()
Set the product's regular price.
Method of the class: WC_Product{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Product = new WC_Product(); $WC_Product->set_regular_price( $price );
- $price(string) (required)
- Regular price.
Changelog
Since 3.0.0 | Introduced. |
WC_Product::set_regular_price() WC Product::set regular price code WC 9.7.1
public function set_regular_price( $price ) { $this->set_prop( 'regular_price', wc_format_decimal( $price ) ); }