Add wc-add-to-cart-variation as js dependency on non product pages
-
I while ago, after version 2 of the plugin, I noticed that for product quick previews on pages that were not product pages (the homepage, for example), it was throwing an error stating that the
wc_variation_form
function didn’t exist.I created this ticket in the past given further detail.
It seems that the
wc-add-to-cart-variation
js woocommerce file (the file wherewc_variation_form
is declared) is not being loaded as dependency on non product pages.After adding such a dependency in a custom theme js file, the problem was solved.
So I create this ticket giving solution to the one I created in the past, also hoping that this gets eventually properly addressed in the plugin core.
- The topic ‘Add wc-add-to-cart-variation as js dependency on non product pages’ is closed to new replies.