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

How to show variations in archive page before add to cart button in ocen wp theme

How to show variations in archive page before add to cart button in ocen wp theme
Screenshot 2024-08-20 154615.png

Hakik Zaman

Hi Subhasish,

Thanks for reaching out to us.

Please try the following snippet using a plugin called Code Snippets:

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

Note: The snippet will not work inside your theme’s functions.php file. Theme’s functions.php hook fired before the “plugins_loaded” hook.

Thank You