WordPress at Your Fingertips
function is not described

WC_Product::set_regular_price() public WC 3.0.0

Set the product's regular price.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_regular_price( $price );
$price(string) (required)
Regular price.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_regular_price() WC 5.8.0

public function set_regular_price( $price ) {
	$this->set_prop( 'regular_price', wc_format_decimal( $price ) );
}