WordPress at a glance
function is not described

WC_Product_Data_Store_Interface::update_product_sales() public WC 1.0

Update a product's sale count directly.

Uses queries rather than update_post_meta so we can do this in one query for performance.

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

No Hooks.

Return

Null. Nothing.

Usage

$WC_Product_Data_Store_Interface = new WC_Product_Data_Store_Interface();
$WC_Product_Data_Store_Interface->update_product_sales( $product_id, $quantity, $operation );
$product_id(int) (required)
Product ID.
$quantity(int|null)
Stock quantity to use for update.
$operation(string)
Either set, increase or decrease.

Code of WC_Product_Data_Store_Interface::update_product_sales() WC 5.0.0

<?php
public function update_product_sales( $product_id, $quantity = null, $operation = 'set' );