WC_Product::set_total_sales()publicWC 3.0.0

Set number total of sales.

Method of the class: WC_Product{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Product = new WC_Product();
$WC_Product->set_total_sales( $total );
$total(int) (required)
Total of sales.

Changelog

Since 3.0.0 Introduced.

WC_Product::set_total_sales() code WC 8.7.0

public function set_total_sales( $total ) {
	$this->set_prop( 'total_sales', absint( $total ) );
}