I would like my WooCommerce login and registration form to redirect to a specific page (after login/registration), but only when the user is on a specific login page.
I have added the following code in my functions.php
file:
if (is_page(6432)) {
add_filter('woocommerce_login_redirect', 'wc_login_redirect');
function wc_login_redirect( $redirect_to ) {
$redirect_to = 'http://www.eliv.com.tw/product/tripsignup';
return $redirect_to;
}
}
The function works without the if (is_page(6432))
on all pages. But I Would like to make this function only work on page 6432.
Also I want to adapt it for registration but so far I couldn't get this to work.
Any help would be very welcome.