Created
July 13, 2015 01:15
-
-
Save Frithir/8878639fb4cb092c4839 to your computer and use it in GitHub Desktop.
Woocommerce - Add cart number
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 if (sizeof(WC()->cart->get_cart()) != 0): ?> | |
<?php global $woocommerce; echo $woocommerce->cart->cart_contents_count; ?> | |
<a href="<?php echo get_permalink(5); ?>"> | |
<i class="fa fa-shopping-cart"></i> <?php global $woocommerce; echo $woocommerce->cart->cart_contents_count; ?> Cart | |
</a> | |
<?php endif ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment