Skip to content

Instantly share code, notes, and snippets.

@neilgee

neilgee/header.php

Forked from jameskoster/header.php
Last active Sep 25, 2015
Embed
What would you like to do?
WooCommerce - Checkout link (when cart is not empty)
global $woocommerce;
if ( sizeof( $woocommerce->cart->cart_contents) > 0 && !is_cart() && !is_checkout() ) :
echo '<a href="' . $woocommerce->cart->get_checkout_url() . '" title="' . __( 'Checkout' ) . '">' . __( 'Checkout' ) . '</a>';
endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment