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

Redirect user after login through woocommerce login page to page with his/her username?

This worked perfectly:

add_filter('woocommerce_login_redirect', 'custom_wc_login_redirect', 10, 3);
  function custom_wc_login_redirect( $redirect, $user ) {
  $redirect = site_url() . '/accounts/' . $user->user_login;
  return $redirect;
}

Thanks everyone.

Related Posts:

  1. Remember page before login page, redirect to that page after login
  2. Woocommerce Login Redirect not working [closed]
  3. How to check if is in cart page? [closed]
  4. WooCommerce lost password reset flow not working with SendGrid (redirect loop)
  5. Custom Redirect after registration in WooCommerce
  6. Import products to WooCommerce by CSV page won’t open [closed]
  7. Woocommerce login not working on the first try
  8. Redirect customer to login page (with other signup plugin) if user not logged in when proceeding to checkout
  9. Woocommerce – Want to block a user agent from accessing specific product pages
  10. How to – proper WordPress 301 redirects?
  11. WooCommerce – Redirect to a product after login
  12. Woocommerce, prevent login after registration and redirect to custom URL
  13. Woocommerce Login Redirect to old domain
  14. Redirect no product url’s to static url
  15. WooCommerce Registration redirect based on page ID
  16. wordpress/woocommerce login url not redirecting correctly
  17. WooCommerce get_author_posts_url() – Author URL redirecting to shop base
  18. Anonymous users can not access website
  19. Is it ok to 301 redirect product-category pages to custom pages?
  20. WooCommerce and ACF: How to Redirect Upon Add to Cart – Partially Working Example
  21. wordpress site auto redirect to another site when I enable woocommerce
  22. How to use woo commerce login to authenticate code php pages?
  23. mydomain.com/wp-login redirects to wordpress.com/wp-login
  24. Woocommerce login to specific page or referrer
  25. WooCommerce shop, my account, cart every page redirect to home page [closed]
  26. How to change redirect code? [duplicate]
  27. Login page so wide [closed]
  28. Remove login fields from /customer-account page [closed]
  29. Account Status/Login on Main Menu with Avatar Pictures
  30. Product categories don’t appear as option to build menu
  31. Woocommerce show cross sells on singe product page [closed]
  32. Search results don’t show products
  33. How to filter Post using Meta Data REST API
  34. WooCommerce checkout: How can I change $field_container of a checkout field?
  35. Is it possible to recalculate cart prices? [closed]
  36. Woocommerce: Get Cart ID
  37. Woocommerce – remove sale price field from dashboard [closed]
  38. Extra row / text field to a product page (WooCommerce)
  39. woocommerce_email_attachments filter arguments [closed]
  40. Child theme dosn’t overwrite WooCommerce (version 3.4.7)
  41. How to Show Single Product – 4 Data by ID in Custom Page without over-riding the existing Woo-Commerce
  42. WOOCommerce redirect after registration to account details
  43. How can I add an additional action button into the woocommerce admin order page?
  44. woocomerce is serving OR Relation instead of AND on taxonomy product_tag
  45. Woocommerce Subscriptions – Set Billing Interval/Period
  46. WooCommerce with ACF: custom fields per product variation
  47. Woocommerce checkout page reload on up dating shipping method
  48. change wp_login url and redirect users at the same time
  49. How to clear woocommerce checkout form after pageload
  50. call_user_func_array() error in class-wp-hook.php
  51. Error after woocommerce update from 2.6 to 3.5 [closed]
  52. Send billing info from woocommerce checkout page to paypal checkout form
  53. Check if a category has a parent category in WooCommerce REST API
  54. Remove a higher quantity from stock according to a variation
  55. Custom redirect user after login based on metadata
  56. Can’t login to my admin area
  57. WooCommerce which roles and capabilities control user login re-direct to Woo Account Page?
  58. how do i remove a woo-commerce widget?
  59. How can I convert woocommerce checkout fields in capital letters
  60. Conditional action hook
  61. Sending Email upon registration
  62. Order by date on category dynamically – Woocommerce
  63. Prevent “/login” to redirect to “/wp-login”
  64. Redirect certain pages if user logged in
  65. wp_login_form redirect
  66. wp_set_object_terms setting only first id from array
  67. I need to export all products and images but I don’t know which table the images are in
  68. Add only sku to product url woocoomerce
  69. What is better way to sync wp multisite woocommerce products
  70. Remove required from a custom field created from WooCommerce Checkout Field Editor plugin
  71. Displaying Woocommerce Product Attributes on single product page
  72. WooCommerce – Child Category wont show, but Parent does
  73. How to hide a random text with a div tag using a class on product pages with a specific tag
  74. Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails [closed]
  75. Recently viewed products – Order by viewed
  76. How can i add product Accessories from front-end using custom php form?
  77. How to save order item custom attributes save into custom table
  78. Manually create an order with a product ID woocommerce
  79. Need help with AJAX login to call php in functions.php to handle redirects based on user cap (role)
  80. WooCommerce subscriptions give option of manual renewal on checkout [closed]
  81. Change order status after checkout
  82. Is it safe to update an old site after backing it up and activating a child theme?
  83. How to add coupon expiry date into the followup emails?
  84. Disable Woocommerce main shop page, but not the product category archive pages
  85. access Woo commerce | WordPress methods externally
  86. Woocommerce set single city to sell to
  87. login_redirect for Mobile Web
  88. Trying to link to a custom css file in a new folder
  89. How do I make a diagonal strikethrough on wordpress? [closed]
  90. Woocommerce – Remove ‘Buy Product’ Button from shop page [closed]
  91. Add woocommerce.css in template?
  92. How to dublicate WC Product title to shortdescription field? [closed]
  93. Use a woocommerce hook to create a table and populate it with a query
  94. Woocommerce product and category in url [closed]
  95. Woocommerce ajax checkout get wc_checkout_params is not defined
  96. Struggling with Per-Item Shipping and Classes
  97. Redirect to current URL and append specified URL parameter on unsuccessful login through Elementor login form widget
  98. Woocommerce plugin increasing Database size
  99. Show Featured products with custom taxonomy template
  100. Snippet to Log “Payment Failed” in Syslog [closed]
Categories woocommerce-offtopic Tags login, redirect, woocommerce-offtopic
Dynamically import posts from one wordpress site to another
Restrict Search Query To After Specific Date

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