Created
July 18, 2014 03:21
-
-
Save viniciusrtf/1a3427bc79b6f8cdeaa7 to your computer and use it in GitHub Desktop.
WooCommerce Hook: Redirect to home when order cancelled
This file contains 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 | |
/** | |
* Hook: Redirect to home when order cancelled | |
*/ | |
add_action('woocommerce_cancelled_order','lenura_redirect_to_home'); | |
function lenura_redirect_to_home() { | |
wp_redirect(home_url()); | |
exit; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment