How to pass/get data to/from data-product_variations object?
-
Hi guys,
wondering if I could get some pointers on how to pass/get data to/from thedata-product_variations
attr form in Product Single pages. I am working on some interactions with the product gallery images and the product variations.Basically, I need to be able to trigger stuff on
woocommerce_variation_has_changed
event.I’ve been able to pass and get my data attributes while hooking to
single_product_large_thumbnail_size
andwoocommerce_single_product_image_thumbnail_html
.But I haven’t been able to pass/get that data during the
woocommerce_variation_has_changed
event. What I have understood is that thewoocommerce_variation_has_changed
trigger gets its data from thedata-product_variations
to insert the product variation related image markup.Summing it up, how would I go to add data attr’s to the
data-product_variations
object? And what would be the best way to get that data during thewoocommerce_variation_has_changed
event?Cheers lads!
- The topic ‘How to pass/get data to/from data-product_variations object?’ is closed to new replies.