Created
October 18, 2021 03:35
-
-
Save yuliyang/38d82eca91808ede8aca158c78b4987a to your computer and use it in GitHub Desktop.
[WooCommerce] Add Continue Shopping
This file contains hidden or 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 | |
// Add continue shopping | |
// add_action( 'woocommerce_before_checkout_form', 'ching_back_to_store' ); | |
add_action('woocommerce_cart_coupon', 'ching_back_to_store'); | |
// add_action( 'woocommerce_cart_actions', 'ching_back_to_store' ); | |
function ching_back_to_store() { ?> | |
<a class="button wc-backward" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>"> <?php _e( '繼續購物', 'woocommerce' ) ?> </a> | |
<?php | |
} | |
add_action( 'woocommerce_thankyou', 'ching_order_received', 10, 1 ); | |
function ching_order_received() { ?> | |
<a class="button wc-backward" href="<?php echo esc_url( wc_get_page_permalink( 'shop' ) ); ?>"> <?php _e( '繼續購物', 'woocommerce' ) ?> </a> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment