Skip to content

Instantly share code, notes, and snippets.

@galengidman galengidman/index.php
Last active Aug 29, 2015

Embed
What would you like to do?
Only display cart link if cart has items
<?php if (sizeof(WC()->cart->get_cart()) != 0) : ?>
<a href="<?php echo WC()->cart->get_cart_url(); ?>">
<span class="cart_totals"><?php echo WC()->cart->get_cart_total(); ?></span>
</a>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.