woocommerce_stock_amount rather than intval

Using woocommerce_stock_amount filter rather than intval cast
This commit is contained in:
justinstern 2014-01-07 02:13:31 -05:00
parent cc27bd8bdf
commit 32d850a76a
1 changed files with 2 additions and 2 deletions

View File

@ -163,7 +163,7 @@ class WC_Product {
if ( $this->managing_stock() ) {
// Update stock amount
$this->stock = intval( $amount );
$this->stock = apply_filters( 'woocommerce_stock_amount', $amount );
// Update meta
update_post_meta( $this->id, '_stock', $this->stock );