Cyber Monday & Friday 40% Deals Return Coupon code: Friday2025

Why does the shopping cart icon not show up when there are variants?

su wen

Why does the shopping cart icon not show up when there are variants?WX20231127-162625@2x.pngWX20231127-162635@2x.png

Hakik Zaman

Hi su,

Thanks for reaching out to us. It was happening because your theme changed the default markup of the ‘Add to cart’ text.

I have added the following code inside your child theme’s functions.php file:

add_filter( 'woo_variation_swatches_archive_add_to_cart_text', function( $default, $variation, $product ){
return '<span class="text">'.$default.'</span>'.'<span class="icon et-icon et-shopping-cart"></span>';
}, 10, 3 );

Please check now and don’t forget to flush your caches like- browser cache, caching plugin cache, and server-side cache.

Thank You