For anyone interested, this is how I managed to solve it:
add_action(‘woo_variation_swatches_pro_archive_page_loaded’, function($wvs_pro){
// Remove the original action
remove_action(‘woocommerce_init’, array($wvs_pro, ‘enable_swatches’), 1);
// Add the Flatsome-specific action
add_action(‘woocommerce_before_shop_loop_item_title’, function() use ($wvs_pro) {
if (function_exists(‘woo_variation_swatches’)) {
woo_variation_swatches()->show_archive_page_swatches();
}
});
}, 10, 1);
This shows it right bellow the image. You can change this woocommerce_before_shop_loop_item_title
to something else like : woocommerce_shop_loop_item_title
, woocommerce_after_shop_loop_item_title
or other woocommerce hooks.
Flatsome incompatibility
Stefan Badii
No matter what I select for the variation swatches inside the options page while using flatsome child theme it always show bellow the select options / buy button:
I even added this to a custom plugin:
The only thing that this does is to add two swatches bellow the buy button.