Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

WooCommerce – Redirect to a product after login

The solution seems to be adding the input[type="hidden"] form element called redirect to the login-form.php in wp-content/themes/my-theme/woocommerce/myaccount directory with the value corresponding to your desired address taken from GET parameters. In my case:

<input type="hidden" name="redirect" value="<?= $_GET['redir']; ?>">

Source: WordPress Support Forums

Related Posts:

  1. Woocommerce login to specific page or referrer
  2. Login redirect to previous page
  3. Redirect to referring page after logging in
  4. check first time login only
  5. How to change the default logout link on WordPress Admin
  6. How to redirect after login, the working way?
  7. Password change when the user login first time
  8. Custom login form redirect to external site
  9. handling login/logout redirects
  10. Remember page before login page, redirect to that page after login
  11. Restrict Access to wp-login.php
  12. Using `auth_redirect` : keeps asking me to login even when I’m logged in
  13. Redirect users after first login
  14. Redirect to current page after wordpress login
  15. How does WordPress redirect to WooCommerce shop page? [closed]
  16. wp-login.php — redirect logged in users to custom URL
  17. Redirect user after login/registration globally
  18. Redirect to login page
  19. You do not have sufficient permissions to access this page
  20. Redirect user after logout
  21. how to do logout redirect to current url
  22. How to redirect user to specific page based on the input password
  23. How do I redirect a user when he is logged in after clicking on a menu
  24. Woocommerce Login Redirect not working [closed]
  25. How to modify the Register link in the login page?
  26. Changing “Lost Password Email Link” to custom password reset page
  27. How to redirect user to a specific page based on username?
  28. Redirect after password update
  29. How to redirect user after login to a specific page?
  30. Redirect Logged In User if page is wp-login.php and $_Get[‘level’] = X
  31. Redirect when accessing /login when logged in
  32. If User is NOT Logged in and Page ID is not 6 – Redirect to Login
  33. Redirect to Current Page after Login
  34. Login redirect problem
  35. How to redirect on login to a specific page if a specific meta user is empty
  36. Redirect user to previous page after signup from custom form
  37. User is logged in after Stripe payment, then redirected, but is then logged out again
  38. Login Redirect – Multiple Scenarios
  39. Usage of the login_redirect filter
  40. Login/Register redirect user with message
  41. Redirect user to original url after login?
  42. Prevent users from going to wordpress profile after login
  43. WordPress directing to Posts page (edit.php) instead of saving post
  44. Custom form redirect after login
  45. Custom redirect user after login based on metadata
  46. Custom Login Form – Redirect user to login page if not logged in
  47. Redirection on Custom page
  48. Redirect user to specific link after login
  49. Load function with login_redirect
  50. Prevent “/login” to redirect to “/wp-login”
  51. Redirect User to login page
  52. All URLs Redirect to Main Page
  53. How to redirect user after login to the page called by his first name?
  54. redirect doesn’t work while using example code
  55. Why I am not able to direct user to my blog section without login?
  56. Redirect After Login Error
  57. Redirect certain pages if user logged in
  58. Force User Login
  59. wp_login_form redirect
  60. custom login form redirect problem
  61. Login redirect to previous page
  62. Trying to re-direct users to specific page based on an ACF variable
  63. Disable redirect to homepage after successful Login, Stay on Current Page
  64. Redirect to custom login page if not logged in and redirect to home if logged in user try to login, how?
  65. wp_login_form() redirect same page
  66. How force WordPress redirect to current custom page after login
  67. Hide a Post everywhere except on redirect
  68. Conditional Login Redirect
  69. Determine user destination on wp-login.php
  70. Redirect user after login to prior page through a wp_login hook
  71. How can force redirected to login for two or more pages to view or access
  72. How to redirect user to Referrer Page using wp_signon in Custom Login Page in WordPress
  73. Redirect after login when WordPress in subdirectory
  74. HOW do you Redirect buddypress login to EDIT tab not PROFILE tab on profile page? [closed]
  75. Login redirects to home page and doesn’t log in
  76. WordPress not loggin user and redirecting after custom registration
  77. redirect_to ignoring the SSL
  78. Redirect user on login using extra field value on login form
  79. wp-login.php redirect problem
  80. login redirect problem – db charset issue?
  81. How to modify the WordPress comes with redirect
  82. Conditional redirect on login using referring URL
  83. Redirect problem: How to redirect to the original URL after login
  84. Custom Login Plugin Redirects to wp-login.php After Site Migration
  85. Login Form Redirection
  86. redirects for removed/deleted woocommerce products
  87. Redirect user to login and then to page where they came from
  88. WordPress Login Page redirecting after failed login
  89. Logging back into WordPress after logging out and having issues with ‘loggedout=true’ in redirect URL
  90. login page not working [closed]
  91. redirect users to the login page
  92. WordPress redirect to splash page once a day for the first week
  93. Accept (once only) policy page on login
  94. login_redirect for Mobile Web
  95. wp_login_form: Redirect to dynamic url according to username
  96. woocommerce shop page Redirect Help
  97. How to disable login and registration pages?
  98. Redirecting logged in users to custom URL
  99. login link with auto_redirect
  100. Why is redirect_to parameter not passed to login form in wp-login.php?
Categories redirect Tags login, redirect, woocommerce-offtopic
How to remove first three words from content and display the excerpt
Organizing the position of widgetized areas in the backend

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress