fbpx
Want To Add Extra Images Per Product Variation? Download This Free Plugin

Archieve Page – Display position – Astra Theme

Hello.

I am using Astra Theme and I would like to move the variation swatches in archieve page to the correct position just before add to cart buttom. Please look the screenshot for clarification. Thank you.

"iScreen

Hakik Zaman

Hi Rey,

Thanks for reaching out to us.

I have added a snippet using the installed Code Snippet plugin. Here is the snippet:

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

Astra theme has their custom hook on the shop archive page. So, the option before/after add to cart of our plugin is not working.

Now it displays like this from my end – https://paste.pics/0cb9b95847de9423b3b1013858d5447e

Please check now by enabling the swatches option on the archive. For your convenience, I have disabled the option.

Hope to hear from you soon.

Thank You