Merge pull request #14748 from woocommerce/fix/stock-in-cart-notice
Correct the stock display notice when a variable product manages stock for it's children
This commit is contained in:
commit
0d89250b3f
|
@ -937,7 +937,7 @@ class WC_Cart {
|
|||
'<a href="%s" class="button wc-forward">%s</a> %s',
|
||||
wc_get_cart_url(),
|
||||
__( 'View Cart', 'woocommerce' ),
|
||||
sprintf( __( 'You cannot add that amount to the cart — we have %1$s in stock and you already have %2$s in your cart.', 'woocommerce' ), wc_format_stock_quantity_for_display( $product_data->get_stock_quantity(), $product_data ), wc_format_stock_quantity_for_display( $products_qty_in_cart[ $product_data->get_id() ], $product_data ) )
|
||||
sprintf( __( 'You cannot add that amount to the cart — we have %1$s in stock and you already have %2$s in your cart.', 'woocommerce' ), wc_format_stock_quantity_for_display( $product_data->get_stock_quantity(), $product_data ), wc_format_stock_quantity_for_display( $products_qty_in_cart[ $product_data->get_stock_managed_by_id() ], $product_data ) )
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue