Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active December 11, 2020 23:42
Show Gist options
  • Save neilgee/ed717e79d5b234390ec2 to your computer and use it in GitHub Desktop.
Save neilgee/ed717e79d5b234390ec2 to your computer and use it in GitHub Desktop.
WooCommerce Hook in Return to Store
<?php
// Add back to store button on WooCommerce cart page
add_action('woocommerce_cart_coupon', 'themeprefix_back_to_store');
// add_action( 'woocommerce_cart_actions', 'themeprefix_back_to_store' );
function themeprefix_back_to_store() { ?>
<a class="button wc-backward" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>"> <?php _e( 'Return to shop', 'woocommerce' ) ?> </a>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment