简体   繁体   中英

Refresh the original page when a user presses back button (after registration) to navigate to previous page

Need Help!

PhP developers and WordPress experts, need your help in a logic.

I am building a Woocommerce website for a client of mine and I have created a custom register form to register a user as wholeseller. Once a user registers as wholeseller, he is taken to the login form automatically where he can then press a button to go back to the page where he originally landed from a source.

Note: I am showing different prices to wholeseller.

The problem I am facing is when the user presses the back button, I am using the onclick method of javascript:

onclick="window.history.go(-1); return false;

But, the problem is when a user presses the back button, the user is navigated back to original page but, the page is loaded from history.

Instead, what i need is the page is reloaded when the use is navigated back so, the logged in wholeseller sees the new updated priced i have set for wholeseller.

Need help in the creation of logic so that the original page is refreshed when i press the back button on the login page.

onclick="window.history.go(-2); return false;

I am using this on button but, it only goes back to original page by loading it from cache and doesn't refresh it to show new prices

I need the page (where user originally landed) to be refreshed when the user has registered and has been logged in and wants to get back to original product to view the updated prices set for wholeseller

You might be looking for : PHP Header

Use it directly after the user registration if it didn't fail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM