Created
June 14, 2018 06:10
-
-
Save wtmujeebu/f8dd00f4436c5327b47db623e552e1ec to your computer and use it in GitHub Desktop.
Redirect to custom page after successful purchase - WebToffee WooCommerce Subscriptions
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
add_action('template_redirect', 'webtoffee_custom_redirect_after_purchase'); | |
function webtoffee_custom_redirect_after_purchase() { | |
global $wp; | |
if (is_checkout() && !empty($wp->query_vars['order-received'])) { | |
wp_redirect('http://www.webtoffee.com/'); // Redirect to your desired page here. | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment