0

I am adding product from my mobile device and due to this everytime new session is generated in wp_sessions. and cart data is not added to the persistent cart in usermeta table.

Can you let me know how we can directly add product to current user persistent cart in usermeta?

1 Answer 1

1

WordPress discourage usage of SESSION concepts.

I Would advice you to check WoCommerce plugin architecture and internal working code, it uses wp_usermeta table to store persistence shopping cart.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes but actually i am adding product from mobile native app. And due to this everytime a new session_key is generated. i dont want to create new session_key eveytime add_to_cart is clicked.?
@parikhdeeshit i want store cart product from mobile device in usermeta table. have you found the solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.