*/ if ( ! function_exists( 'botiga_woocommerce_cart_link_fragment' ) ) { /** * Cart Fragments. * * Ensure cart contents update when products are added to the cart via AJAX. * * @param array $fragments Fragments to refresh via AJAX. * @return array Fragments to refresh via AJAX. */ function botiga_woocommerce_cart_link_fragment( $fragments ) { $cart_icon = get_theme_mod( 'cart_icon', 'icon-cart' ); ob_start(); ?> cart->get_cart_contents_count() ); ?> '; $link .= '' . botiga_get_svg_icon( $cart_icon, false ) . '' . esc_html( WC()->cart->get_cart_contents_count() ) . ''; $link .= ''; return $link; } } if ( ! function_exists( 'botiga_woocommerce_header_cart' ) ) { /** * Display Header Cart. * * @return void */ function botiga_woocommerce_header_cart() { $show_cart = get_theme_mod( 'enable_header_cart', 1 ); $show_account = get_theme_mod( 'enable_header_account', 1 ); $show_wishlist = get_theme_mod( 'shop_product_wishlist_layout', 'layout1' ) !== 'layout1' ? true : false; $enable_header_wishlist_icon = get_theme_mod( 'enable_header_wishlist_icon', 1 ); if ( is_cart() ) { $class = 'current-menu-item'; } else { $class = ''; } ?> ' . botiga_get_svg_icon( 'icon-user', false ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>