StoreApi – Cart not populating

[ad_1]

One thing that might be worth mentioning is that it’s a lottery store – is there a limitation where lottery items don’t work with the Store Api?

Also worth mentioning, I’m using the API headlessly, so the frontend is completely separate. Is there some other setup that needs to happen (i.e. a script injection) that I’m missing?

  • This reply was modified 1 hour, 28 minutes ago by patbenjamin.

From digging through the cookies, it looks like a bunch of woocommerce ones are being sent back on each add-item request but aren’t being sent back on the get cart requests.

wp_woocommerce_session_SOME_GUID, woocommerce_cart_hash, and woocommerce_items_in_cart

Cerdentials should be allowed cross origin with my fetch configuration, and other wordpress related cookies are being saved and then sent just fine. Is there something in the cookie configuration for the woo commerce ones that explicitly makes them same origin only by default?

Solved this by forcing WooCommerce’s cookies to include SameSite=None by modifying the .htaccess file

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer