dsdqpdjpq16640651 2018-08-26 14:24
浏览 172

WooCommerce:允许在未登录时将项目添加到购物车

I want to allow adding items to the cart even when a user is not logged-in. This works on a local version on a localhost, but in a remote server version, it doesn't work, and I'm not sure why, and couldn't see any immediate differences.

One difference I can see is in the paths where the versions are installed, affecting the path of the cookie, in the local version it's /pathname/ and in the remote it's simply the root path (/). After adding in the local version I can see cookies saved: woocommerce_cart_hash and woocommerce_items_in_cart, they are not saved when adding items in the remote version.

The add is made with a request to ?add-to-cart endpoint.

Any directions or leads as to how to resolve this will be appreciated.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 相敏解调 matlab
    • ¥15 求lingo代码和思路
    • ¥15 公交车和无人机协同运输
    • ¥15 stm32代码移植没反应
    • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
    • ¥100 连续两帧图像高速减法
    • ¥15 如何绘制动力学系统的相图
    • ¥15 对接wps接口实现获取元数据
    • ¥20 给自己本科IT专业毕业的妹m找个实习工作
    • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?