Merge pull request #22646 from woocommerce/fix/22118
Fix Hold-stock behavior between simple products and variable products
This commit is contained in:
commit
c7d2b1ac9b
|
@ -310,7 +310,7 @@ function wc_get_held_stock_quantity( $product, $exclude_order_id = 0 ) {
|
|||
AND posts.post_type IN ( '" . implode( "','", wc_get_order_types() ) . "' )
|
||||
AND posts.post_status = 'wc-pending'
|
||||
AND posts.ID != %d;",
|
||||
'variation' === get_post_type( $product->get_stock_managed_by_id() ) ? '_variation_id' : '_product_id',
|
||||
'product_variation' === get_post_type( $product->get_stock_managed_by_id() ) ? '_variation_id' : '_product_id',
|
||||
$product->get_stock_managed_by_id(),
|
||||
$exclude_order_id
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue