Adding to cart issues or session issues?
-
I’ve tried adding cart items using Postman and even though Postman returns successfully, when I inspect the front end of the staging site and endpoints, I am not seeing the data I added via Postman.
My endpoint for viewing the cart data: ‘https://staging.example.example.co.uk/wp-json/cocart/v2/cart/items/’ is returning only the cart item I added manually via the front end.
My endpoint for adding to cart: https://staging.example.example.co.uk/wp-json/cocart/v2/cart/add-item/
JSON Data being sent:{ "id": "10494", // Product ID for the "large" variation "quantity": "1", "item_data": { "pa_name_here": "amesviapostman", "pa_number_print": "10" }, "variation": { "attribute_pa_size": "large", // Customize this based on your product's attributes "attribute_pa_add-name-and-number": "yes-add-3-99", // Customize this based on your product's attributes "attribute_pa_arm-patches-to-be-added": "no-thank-you" // Customize this based on your product's attributes } }
Question
Do you know why the data I sent using Postman is not being added to the cart endpoint or front end? I can only assume it’s something to so with session cookies, but I don’t know why or how to remedy this.
My ultimate goal is to send cart data from one site to another. I realise batch sending isn’t possible right now, so I am going to use a workaround to send one at a time until it is possible.
- The topic ‘Adding to cart issues or session issues?’ is closed to new replies.