I am using the Woocommerce Waitlist plugin to allow users to subscribe to product waitlists.
After subscribing to a waitlist I want to redirect the user to another page to complete a form.
I am using the wcwl_after_add_user_to_waitlist
action, which I found in the documentationlike this:
add_action( 'wcwl_after_add_user_to_waitlist', 'redirect_to_waitlist_form', 30, 2);
function redirect_to_waitlist_form( $wc_product, $wp_user ) {
wp_redirect( '/' );
exit;
}
The problem is that the page doesn't redirect I guess because something in the background is happening. I can see a pending progress bar on the page and nothing happens.