WordPress at Your Fingertips
function is not described

WC_Product::set_total_sales() public WC 3.0.0

Set number total of sales.

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

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_total_sales() WC 5.5.2

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