0

I'm trying to get the variation prices to displays in the Add to Cart button for WooCommerce and I've implemented Woocommerce variation product price inside Add to cart button answer code.

This works great on both the single product page but seems to not work at all when there are more than 1 variation product on the shop/archive page.

The issue seems to be with the jQuery selectors $('input'), $("button.single_add_to_cart_button.button.alt span" )

It's trying to apply the changes to all instances of button.single_add_to_cart_button.

I'm wondering if it's possible to target the specific product inputs change and then update the button.single_add_to_cart_button for that specific product.

I've tried using the instance of $(this) but that has not worked.

Any help would be greatly appreciated.

Thanks

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399

0 Answers0