[英]How can i directly add particular product to persistent cart in wordpress
I am adding product from my mobile device and due to this everytime new session is generated in wp_sessions. 我正在从移动设备中添加产品,因此每次在wp_sessions中生成新会话时,都会这样做。 and cart data is not added to the persistent cart in usermeta table.
并且购物车数据未添加到usermeta表中的持久购物车中。
Can you let me know how we can directly add product to current user persistent cart in usermeta? 您能告诉我如何将产品直接添加到usermeta中的当前用户持久购物车吗?
WordPress discourage usage of SESSION concepts. WordPress不鼓励使用SESSION概念。
I Would advice you to check WoCommerce plugin architecture and internal working code, it uses wp_usermeta table to store persistence shopping cart. 我建议您检查WoCommerce插件体系结构和内部工作代码,它使用wp_usermeta表存储持久性购物车。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.