Answer the question
In order to leave comments, you need to log in
How to redirect the user to a specific page after submitting an order in Woocommerce?
I looked through all the settings in the admin panel, I also did not find anything in Google. I may not be looking. The thing is obvious. How can I direct the user to the page I need after placing an order?
Answer the question
In order to leave comments, you need to log in
Can you do it like this
add_action( 'template_redirect', 'my_checkout_redirect' );
function my_checkout_redirect() {
global $wp;
if ( is_checkout() && ! empty( $wp->query_vars['order-received'] ) ) {
wp_redirect( '%my_custom_url%' );
exit;
}
}
On some "payment" gateways there is a field where to redirect after payment
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question