Skip to content

Commit

Permalink
Only show return to shop link if shop page is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed May 13, 2016
1 parent b039600 commit 668d3fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions templates/cart/cart-empty.php
Expand Up @@ -30,8 +30,10 @@

<?php do_action( 'woocommerce_cart_is_empty' ); ?>

<p class="return-to-shop">
<a class="button wc-backward" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<?php _e( 'Return To Shop', 'woocommerce' ) ?>
</a>
</p>
<?php if ( wc_get_page_id( 'shop' ) ) : ?>
<p class="return-to-shop">
<a class="button wc-backward" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<?php _e( 'Return To Shop', 'woocommerce' ) ?>
</a>
</p>
<?php endif; ?>

0 comments on commit 668d3fa

Please sign in to comment.