How to remove the ''return to my account'' button for users that are not yet vendors

How to remove the ‘‘return to my account’’ button that shows when a listing is submitted for normal users

I want to remove the button for only users that are not yet vendors because when a user submits a listing and has not yet been approved as a vendor it redirects the user to a broken homepage but if already a vendor it works fine

Please I would appreciate it if you could provide a code snippet quickly Thanks

Or preferably how can I change the redirect URL to query the current user profile rather than querying as if it is a vendor profile as the user URL structure works for both Normal users and vendors?

Example:
URL Link: www.domain.com/user/username

If ‘username’ can be replaced with the current user’s ‘username’ it would work fine for me for both normal users and vendors

Please help with a snippet that can redirect the ‘return to my account’ button to such a query URL link

Hi,

Please provide more details regarding this issue (e.g., your actions step by step with screenshots, etc.). This will help us to reproduce and resolve the issue faster.

I’ve explained everything above however these are the visual images

When I submit a listing it takes me to the submit complete page and you can see the return to my account button in the screenshot below

When I click the button as a first time user who hasn’t been approved as a vendor yet and is submitting a listing for the first time, it redirects me to my home page below which is a broken version of my homepage

This is the url that shows when the button is clicked

Note: I replaced my domain name with domain to keep my website private

So you can see that the buttons url is making a query for the account page as if the user is already a vendor hence why the proper account page doesn’t show up because the user isn’t yet approved as a vendor

However if the user then gets approved as vendor, when further listings are submitted and the return to my account button is clicked, it works fine and redirects the user to the proper account page because the user is now actually a vendor.

Here’s a picture of the account page below which is the normal vendor profile page

Now I was asking if you could provide me a snippet that removes the return to my account button only for normal users who are not vendors

Or preferably, if you could provide a snippet that redirects all users and vendors to the users account page by querying them as users instead of vendors as the user URL structure for users account page works for both Normal users and vendors

Example: The below url structure shows account pages for any type of user if the username in the url link below is replaced with the users username

URL Link: www.domain.com/user/username

Please help with a snippet that can redirect the ‘return to my account’ button to such a query URL link

Hi,

We checked this issue from our side, and it seems okay. After clicking on Return to My Account, we were redirected to the user’s dashboard. Please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, ensure that caching is disabled for logged-in users. Also, please refresh permalinks How to refresh WordPress permalinks - HivePress Help Center

Yes because your a vendor I guess… I tried your suggestions but its still not working as intended.
Please can you help me provide a snippet to change the link to a custom url for the return to my account button as I don’t want to escalate this issue

I think I’ll like it to just take me back to the home page if you can’t help with my request.

Can I also use loco translate to change the phrase from ‘return to my account’ to ‘go back to homepage’ ?

Hi,

Please note that we cannot solve the problem because everything works on our side. It redirects to the user’s profile when the user clicks on Return to My Account. This can only be an issue if there is a customization on your end. Therefore, we recommend checking customizations and code snippets, as there should not be a redirect to the vendor’s page.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.