Created
August 5, 2016 19:00
-
-
Save aboglioli/4a76914f8eede6f7e2664b214910dbd3 to your computer and use it in GitHub Desktop.
WooCommerce - Change cart button of the upper-right corner
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
<?php | |
// Cart Link | |
if ( !function_exists( 'cg_cart_link' ) ) { | |
function cg_cart_link() { | |
?> | |
<a class="cart-contents" href="<?php echo esc_url( WC()->cart->get_cart_url() ); ?>" title="<?php _e( 'View your shopping cart', 'woocommerce' ); ?>"> | |
<span class="count"><strong>Cart</strong>: <?php echo wp_kses_data( sprintf( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count(), 'woocommerce' ), 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