Update status based on stock, always

This commit is contained in:
Mike Jolley 2018-06-19 13:35:17 +01:00
parent e0ccc64571
commit 0cee6a69b0
1 changed files with 1 additions and 1 deletions

View File

@ -1314,7 +1314,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
$this->set_stock_status( 'onbackorder' );
// If the stock level is changing and we do now have enough, force in stock status.
} elseif ( $this->get_stock_quantity() > get_option( 'woocommerce_notify_no_stock_amount', 0 ) && ( array_key_exists( 'stock_quantity', $this->get_changes() ) || array_key_exists( 'manage_stock', $this->get_changes() ) ) ) {
} elseif ( $this->get_stock_quantity() > get_option( 'woocommerce_notify_no_stock_amount', 0 ) ) {
$this->set_stock_status( 'instock' );
}
}