Persistent Cart with Woocommerce backend? - Stack Overflow

Nextjs Frontend, WooCommerce headless backend.Trying to have a persistent cart with a signed in user,

Nextjs Frontend, WooCommerce headless backend.

Trying to have a persistent cart with a signed in user, and just having a lot of difficulty in that. I've tried to create a custom plugin that adds a user's cart as metadata, but WooCommerce seems to have a lot of resistance to someone editing their own metadata (have set a customer as admin but still having issues, postman requests to metadata is just not changing it).

Everything I've found is that WooCommerce's cart is not persistent, but session based. Even the cocart API I've read about is using a session based cart.

Now, maybe that session based cart could be saved, but it still comes back to having to edit the user's metadata?

Anyway, I am having a great deal of difficulty on this and cannot find solutions. I see lots of people discuss trouble with this going back decades with no solutions...

Nextjs Frontend, WooCommerce headless backend.

Trying to have a persistent cart with a signed in user, and just having a lot of difficulty in that. I've tried to create a custom plugin that adds a user's cart as metadata, but WooCommerce seems to have a lot of resistance to someone editing their own metadata (have set a customer as admin but still having issues, postman requests to metadata is just not changing it).

Everything I've found is that WooCommerce's cart is not persistent, but session based. Even the cocart API I've read about is using a session based cart.

Now, maybe that session based cart could be saved, but it still comes back to having to edit the user's metadata?

Anyway, I am having a great deal of difficulty on this and cannot find solutions. I see lots of people discuss trouble with this going back decades with no solutions...

Share edited Mar 8 at 17:17 LoicTheAztec 255k24 gold badges399 silver badges446 bronze badges asked Mar 7 at 18:20 EvanProgramsEvanPrograms 195 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Normally GET is used to list data. I had a similar problem with real-time data working with REACT and PHP. The solution was to change the GET to POST and it worked. I hope this little tip helps you.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744913643a4600701.html

相关推荐

  • Persistent Cart with Woocommerce backend? - Stack Overflow

    Nextjs Frontend, WooCommerce headless backend.Trying to have a persistent cart with a signed in user,

    1天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信