Support Forum › Forums › Woncep – Fashion Style WooCommerce Theme › How to add size charts to Woncep Theme › Reply To: How to add size charts to Woncep Theme
April 8, 2023 at 4:43 pm
#4123
Please copy this code and paste to the file functions.php( child-theme):
if(class_exists('WooCommerce')) {
add_filter( 'woocommerce_add_to_cart_fragments', 'elementor_pro_cart_count_fragments' , 1, 9999 );
function elementor_pro_cart_count_fragments($fragments) {
ob_start();
woocommerce_mini_cart();
$mini_cart = ob_get_clean();
$fragments['div.widget_shopping_cart'] = '<div class="widget woocommerce widget_shopping_cart"><div class="widget_shopping_cart_content">' . $mini_cart . '</div></div>';
return $fragments;
}
}