Make quantity selector more specific Only select the primary quantity (#36087)

* Add changelog

* Use the input name when selecting the quantity field.

* Changelog tweak.

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
This commit is contained in:
Kathy 2022-12-20 11:48:19 -07:00 committed by GitHub
parent 92496e3578
commit f2a4eed807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: enhancement
Improves handling of the single product page quantity selector, in relation to variable products.

View File

@ -245,7 +245,7 @@
$dimensions = form.$product.find(
'.product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value'
),
$qty = form.$singleVariationWrap.find( '.quantity' ),
$qty = form.$singleVariationWrap.find( '.quantity input[name="quantity"]' ),
purchasable = true,
variation_id = '',
template = false,