woocommerce password reset will empty cart - wordpress

Is it normal that if I reset my password and then login again to the store it will empty my cart?
These are steps I have taken:
Login to the woocommerce store
add a product to the cart
logout from the store
reset my password
login again to the store with the new password
the cart is now empty.
I believe that it is the password rest that triggers the cart to be emptied. Why does it work this way? I suppose it is a security issue.
If I don't reset my password and logout and then login again, the cart will contain the product I previously added. This is fine.
Just wondering why the password rest will empty the cart.

Just wondering why the password rest will empty the cart.
This is normal behaviour. like Ozgur said, the user session is "cleared" upon resetting the password.
Why does it work this way? I suppose it is a security issue.
It is indeed a security based behaviour. If you want to learn/understand a bit more about what is happening, you can take a look at what are Nonces.
Source # https://codex.wordpress.org/WordPress_Nonces.
To get around that behaviour and remain secure:
You could save the user cart info as a cookie/LocalStorage (JS based solution) (More # https://www.w3schools.com/jsref/prop_win_localstorage.asp) and save the product ID that are in the user cart...
You could also save it as a user metadata (PHP based solution) and serve it back to the user in that specific case.
You could for example, when the user log back in, present him a popup window and a button to add all the items to his cart once more OR simply redirect him straight away to his cart by adding all the items. You can take a look at the link bellow to add products via url.
Source # https://gist.github.com/lukecav/ab9dbdee88de686ce6b59c264cde8970

Related

Edit specific woocommerce notification message

On our woocommerce store, we only allow new customers to access the shop after their new account has been manually approved.
However, after successfully registering a new account the user is shown this misleading notification by woocommerce - and I'm not sure where to edit this:
> Your account was created successfully and a password has been sent to your email address.
Any ideas on where this message is generated? and how I can change the text
I'm not sure how to edit this message, but I may know a workaround if you want it to make it disappear.
You can try to inspect the element to find out the class and set display: none to it in your theme's custom css.
It may buy you time until you find the actual solution.

GravityForms, GravityViews, action hook to know when record is approved

I have GravityForms and GravityViews in my WP instance. I am building a system where a user can book a reservation using GravityForms. If that reservation is for 3 or more nights, then that agent is awarded 3 points. An admin agent can then view all reservations in GravityViews from multiple agents. The admin agent's job is to review all the booked reservations and click a button in the table to "approve" the agent to award him the points.
I am not sure what the best approach is to allow the admin agent to "approve" each record he is viewing in GravityViews. I feel like I need to add a column to the view that has a checkbox (approve/disapprove) and wire up "add_action()" to this check/uncheck event. When the admin agent approves an agent's record, I want to do some other actions, such as update the user's total points earned and remove the record from the current GravityView.
Does GravityViews provide this functionality? If not, should I create a custom table view in WP where I have one column that is my action (check/uncheck) and listen for event clicks?
WP has so many plugins that I am not sure if I should use something that exists or develop this custom functionality from scratch. I am new with WP, so I am limited on knowing what exists.
If I were to do this outside of WP, I would load up my page, display a table view of the GravityForm data, append a column to each record that has a checkbox in it, and when the user clicks that checkbox, I would update the database and refresh my current view. Being unfamiliar with WP, I am not sure what all I can do because all I have access to is functions.php and functions.js.
Thanks for the help.

Wordpress Two Steps Autoresponders Form Submition

Need some wordpress gurus insight here!
Basically, I've a plugin call Contact Form 7 to display a form on my site.
May I know how can I achieve these steps :-
User click submit, they will auto-receive a mail containing activation link.
User click the activation link, they will auto-receive another email to containing some text to ask them to upload a picture.
On my end, I'll only receive the lead only when the user completing the 2nd step.
Is it possible to do it with wordpress plugins? Or I need some external api or something?
You can get more information to set up the points for Autoresponders Form Submission
Go Through the link - https://www.formget.com/send-copy-of-message-to-form-submitter-use-auto-responder/

WooCommerce | After logout the cart getting empty

I am totally new on WooCommerce, and I have a client with an "issue", that I am not sure if that is really an issue.
What he described to me, was the following scenario:
The client comes in the web site,
The client add some product in the cart,
Then he goes in the cart, and he perform a login
then the client logou, and the cart is getting empty.
So the question is, this behavior is the normal procedure for WooCommerce ? If so, is there a way to avoid the empty cart after the user is getting log ou of his account ?
There is a setting "clear cart on logout". Probably is enabled.

How to set woocommerce checkout form values to empty

I am using Woocommerce plugin for a WordPress site. But when as user I checkout I can see form populated with last user's details. How to set form entries to blank in Woocommerce. Please help.
Fields are pre-populated with last user's detail. Is there a way to avoid this?
Not sure with your exact issue , but there might be two possible situations in your case.
You might me logged in with same user and then trying to
checkout, as woo-commerce will fetch the details of currently active
user and auto fill it during checkout.
Fields might get auto fill from your browser cache , try to checkout using another browser or
by clearing cache , if its due to cache than that's not an issue at
all, as it your browser functionality which keep the data store
temporarily for your next usage.

Resources