Warning: This method has been deprecated.

WC_Abstract_Legacy_Product::reduce_stock( int $amount = 1 )

Reduce stock level of the product.


Description Description


Parameters Parameters

$amount

(Optional) Amount to reduce by. Default: 1

Default value: 1


Top ↑

Return Return

(int) new stock level


Top ↑

Source Source

File: includes/legacy/abstract-wc-legacy-product.php

	public function reduce_stock( $amount = 1 ) {
		wc_deprecated_function( 'WC_Product::reduce_stock', '3.0', 'wc_update_product_stock' );
		return wc_update_product_stock( $this, $amount, 'decrease' );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.