Created
January 22, 2020 05:56
-
-
Save yousufansa/892df9b4d06404b83c088f4e9cc87876 to your computer and use it in GitHub Desktop.
Electro - Mobile Header Cart Link issue on Offcanvas Cart Enabled Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'electro_handheld_footer_bar_cart_link' ) ) { | |
function electro_handheld_footer_bar_cart_link() { | |
$header_cart_icon = apply_filters( 'electro_header_cart_icon', 'ec ec-shopping-bag' ); | |
if ( is_woocommerce_activated() ) { | |
$cart_link = wc_get_cart_url(); | |
?> | |
<a class="footer-cart-contents" href="<?php echo esc_url( $cart_link ); ?>" title="<?php esc_attr_e( 'View your shopping cart', 'electro' ); ?>"> | |
<i class="<?php echo esc_attr( $header_cart_icon ); ?>"></i> | |
<span class="cart-items-count count"><?php echo wp_kses_data( WC()->cart->get_cart_contents_count() );?></span> | |
</a> | |
<?php | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment