I found what was my problem is priority. Some other plugin was using a 1000 priority, so I had to boost my priority when declaring the hook. That way:
add_filter( 'woocommerce_login_redirect', 'share_login_redirect', 1100, 2 );
instead of
add_filter( 'woocommerce_login_redirect', 'share_login_redirect', 10, 2 );
Related Posts:
- Remember page before login page, redirect to that page after login
- Redirect user after login through woocommerce login page to page with his/her username?
- How to check if is in cart page? [closed]
- WooCommerce lost password reset flow not working with SendGrid (redirect loop)
- Custom Redirect after registration in WooCommerce
- Import products to WooCommerce by CSV page won’t open [closed]
- Woocommerce login not working on the first try
- Redirect customer to login page (with other signup plugin) if user not logged in when proceeding to checkout
- Woocommerce – Want to block a user agent from accessing specific product pages
- How to – proper WordPress 301 redirects?
- WooCommerce – Redirect to a product after login
- Woocommerce, prevent login after registration and redirect to custom URL
- Woocommerce Login Redirect to old domain
- Redirect no product url’s to static url
- WooCommerce Registration redirect based on page ID
- wordpress/woocommerce login url not redirecting correctly
- WooCommerce get_author_posts_url() – Author URL redirecting to shop base
- Anonymous users can not access website
- Is it ok to 301 redirect product-category pages to custom pages?
- WooCommerce and ACF: How to Redirect Upon Add to Cart – Partially Working Example
- wordpress site auto redirect to another site when I enable woocommerce
- How to use woo commerce login to authenticate code php pages?
- mydomain.com/wp-login redirects to wordpress.com/wp-login
- Woocommerce login to specific page or referrer
- WooCommerce shop, my account, cart every page redirect to home page [closed]
- How to change redirect code? [duplicate]
- Login page so wide [closed]
- Remove login fields from /customer-account page [closed]
- Login redirect to previous page
- Getting the gallery images from products in woocommerce?
- add_filter to modify woocommerce_cart_item_name hyperlink
- Get product details by url key in WordPress woocommerce
- Using `auth_redirect` : keeps asking me to login even when I’m logged in
- pre_get_posts with WooCommerce Shortcode Query
- Reverse engineering of WooCommerce Storefront filters
- Use WooCommerce function in other WordPress plugin
- Add product description (content) to WooCommerce customer processing order email
- Firing a function AFTER redirect
- Woocommerce Product Image and Thumbnails custom function
- Create WooCommerce new order with specific ID
- woocommerce change order statuses count for specific role
- is_user_logged_in() always returns false for woocommerce_login_redirect
- WordPress ‘on behalf of’ email
- How to change a column width on WooCommerce orders page (Admin)
- WooCommerce Shop Orders by Date
- Show list of woo commerce orders where particular zip code exists using pre_get_posts?
- display first sale product in shop
- Featured image for product listings, but another image as the product image?
- How to add custom data to cart for a specific product which I have shown on a page programmatically and with a separate anchor adding it to cart?
- How to select from two different tables to display orders list with custom column from other table
- Keep getting Notice: Trying to get property of non-object in …\wp-includes\post.php on line 4153 when generating woocommerce coupon
- How to subscribe free subscription on user registration in woocommerce subscription plugin?
- Woocommerce how to alter shipping tax before checkout
- Woocommerce cart page – Add “Free” to the shipping label when shipping is 0
- Change product in cart when billing country is changed
- How to override the title tag for woocommerce endpoints?
- How to re-arrange this hooked content?
- Pre filter woocommerce products to remove a certain category of products
- WooCommerce Stripe Plugin not showing up in settings [closed]
- Woocommerce – Change the template?
- Wooocommerce disable check_cart_item_stock if cart item has specific meta
- Force meta data on specific product type
- WooCommerce plaintext mail doesn’t display currency symbol
- Woocommerce, finding the ordinal number of a purchase for a certain product
- WooCommerce order refund get qty refunded
- WP/WooCommerce multisite with polylang, product duplication between websites [closed]
- WooCommerce add_to_cart
- WooCommerce Simple Product Options List
- Add custom body tag if product is out of stock
- Functions.php change for Woocommerce not working
- Woocommerce replace product page image with product tabs [closed]
- Janrain/Simple Modal under Redirected Domain
- How to get all customers cart from woocommerce API?
- WooCommerce login redirect based on cart
- send order detail to swiftpos
- WordPress Woocommerce REST API JSON Error
- data-value for custom woocommerce field showing in code but not visable on page load
- call_user_func_array() expects parameter 1 to be a valid callback, class ‘WC_Rapyd’ does not have a method ‘install’
- How can we find a WooCommerce shop bottleneck? (only when cart is full)
- Conditional for product attribute page
- Setting Page Visibility for WooCommerce Default Page Doesn’t Work
- Deleted products from woocommerce are still in the database
- Remove cart functionality from WooCommerce so it doesn’t remember the products [closed]
- Apply CSS to certain product thumbnails only
- Files names changed (with strange characters) after being uploaded to cpanel
- woocommerce_add_to_cart custom function called several times
- Customer Email Address
- Adding time of order to Admin email for new order
- Hide add to cart when product variation has no price or is unavailable
- How to get the WooCommercer product variation image
- how add css class to product boxes li, for img, add cart button, decs, price… [closed]
- How can I hide the entire “Shipping Details” block on the admin side of Woocommerce? [closed]
- Admin user getting redirected to /wp-admin/user
- How do I to override login redirect on specific pages?
- Can I remove WooCommerce specific product categories from shop managers?
- Fetch products with filter by similar categories at same time
- Trying query woocommerce product order by menu order and stock status
- editing product page template – getting template for related products not working
- Disable Woocommerce Block Editor
- Woocommerce backend sorting product drag drop by menu_order to date