1
I am developing my own Woocommerce theme, and now I need to make a redirect after logging into a particular page where I am using the Woocommerce login form.
For this I added the following function in functions.php
if (!is_account_page()) { add_filter('woocommerce_login_redirect', 'redirect_after_login_cart'); function redirect_after_login_cart(){ wp_redirect( get_permalink( get_page_by_path('finalizar-compra') ) ); exit; } }
I want only the login-cart page, make the redirect after login to the checkout page. My account form keeps redirecting to my account page. As it stands, all my Woocommerce login forms are redirecting to the checkout page. Parole is not being respected.
If anyone can help me, I’d be very grateful.
I solved my problem based on this link: Stackoverflow
– Flávia Amaral