Fix; Deprecated methods should return

This commit is contained in:
Mike Jolley 2017-02-08 16:18:42 +00:00
parent dd70417758
commit b391e64453
1 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ abstract class WC_Abstract_Legacy_Product extends WC_Data {
*/
public function reduce_stock( $amount = 1 ) {
wc_deprecated_function( 'WC_Product::reduce_stock', '2.7', 'wc_update_product_stock' );
wc_update_product_stock( $this, $amount, 'decrease' );
return wc_update_product_stock( $this, $amount, 'decrease' );
}
/**
@ -195,7 +195,7 @@ abstract class WC_Abstract_Legacy_Product extends WC_Data {
*/
public function increase_stock( $amount = 1 ) {
wc_deprecated_function( 'WC_Product::increase_stock', '2.7', 'wc_update_product_stock' );
wc_update_product_stock( $this, $amount, 'increase' );
return wc_update_product_stock( $this, $amount, 'increase' );
}
/**