• Resolved aircod

    (@aircod)


    Hello,
    in the new plugin version, added “override price”. How can I do that?
    Also, I want to display custom_data in the cart and further in the order, is it possible? I am using the default WordPress template. The plugin is used to integrate my plugin written in React with WordPress

Viewing 1 replies (of 1 total)
  • Plugin Author Sébastien Dumont

    (@sebd86)

    Example of overriding the price.

    curl -X POST https://example.com/wp-json/cocart/v2/cart/add-item \
      -H "Content-Type: application/json" \
      -d '{
        "id": "129",
        "quantity": "1",
        "price": 24
      }'
    

    Example of adding custom item data.

    curl -X POST https://example.com/wp-json/cocart/v2/cart/add-item \
      -H "Content-Type: application/json" \
      -d '{
        "id": "3008",
        "quantity": "1",
        "item_data": {
          "engraved_name": "John Snow",
          "engraved_size": "Medium"
        }
      }'
    
Viewing 1 replies (of 1 total)
  • The topic ‘Override price’ is closed to new replies.