Merge pull request #12839 from woocommerce/fix/stock-bulk

Fix stock updating on bulk edit.
This commit is contained in:
Claudio Sanches 2017-01-16 20:41:52 -02:00 committed by GitHub
commit feff675ca3
1 changed files with 1 additions and 1 deletions

View File

@ -1271,7 +1271,7 @@ class WC_Admin_Post_Types {
$manage_stock = $was_managing_stock;
}
$stock_amount = 'yes' === $manage_stock && isset( $_REQUEST['_change_stock'] ) ? wc_stock_amount( $_REQUEST['_change_stock'] ) : '';
$stock_amount = 'yes' === $manage_stock && ! empty( $_REQUEST['change_stock'] ) ? wc_stock_amount( $_REQUEST['_stock'] ) : $product->get_stock_quantity();
if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) {