WC_Product::set_price()publicWC 1.0

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() code WC 8.7.0

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