fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Upgraded Variation Swatches Issues

Airene Huang

Issue 1: After upgrading the Pro plugin, the previous code you have added to the theme functions is duplicating the swatches. I disabled it now. How to let the swatches stay above the title and the price (by default it stays below).Issue 1.png

DIsable.png

Issue 2: I think it is affecting the website performance again but not sure if it is because of the duplicated swatches shown in the archive page. Hope the performance will be better if this issue is solved.

Hakik Zaman

Hi Airene,

Thanks for reaching out to us. Please comment on the previous code and add a plugin called Code Snippets. Then create a new snippet by copying the below code-

add_action('woo_variation_swatches_pro_archive_page_loaded', function($wvs_pro){
   remove_action('woocommerce_init', array( $wvs_pro, 'enable_swatches' ), 1);
   add_action('woocommerce_shop_loop_item_title', array( $wvs_pro, 'after_shop_loop_item' ), 9);
}, 10, 1);

Thank You

Airene Huang

Hi Hakik,

Thank you so much this works.

 

Best,

Airene

Airene Huang

Hi Hakik,

Another issue was found.

So when I clicked the swatches, the product image doesn’t change to the corresponding selected swatch.

 

Any idea?

Hakik Zaman

Hi Airene,

I have adjusted the image selector according to your theme.

Please check now and before checking don’t forget to clear your cache like- browser cache, caching plugin cache, and server-side cache

Then let me know if it resolves your issue or not.

Thank You

Airene Huang

Hi Hakik,

 

Yes, it works!

FYI, Already leave a good review.

Thanks again.