Woocommerce cart API error
-
In the plugin admin settings are enabled such options:
– Earn Points Per Currency Settings
Per Points Conversion 1$ = 2 ?Points
– Redemption Settings
Conversion rate for Cart Sub-total Redemption: 100 points = 1$
Allow Customers to Apply Points During Checkout: trueWhen user applies points on Website UI checkout, appears Cart Discount and everything works good. But if we apply points on Website UI and after that use Woocommerce API: GET /wp-json/wc/store/v1/cart/ in the json response we get error. Example of response: { "items": [ { "key": "8a1e808b55fde9455cb3d8857ed88389", "id": 1076, "type": "simple", "quantity": 1, "quantity_limits": { "minimum": 1, "maximum": 9999, "multiple_of": 1, "editable": true }, "name": "Adidas Cap", "short_description": "", "description": "", "sku": "PPYX-CAU086_80X", "low_stock_remaining": null, "backorders_allowed": false, "show_backorder_badge": false, "sold_individually": false, "permalink": "/product/adidas-cap-2/", "images": [ ], "variation": [], "item_data": [], "prices": { "price": "73900", "regular_price": "73900", "sale_price": "73900", "price_range": null, "currency_code": "UAH", "currency_symbol": "?", "currency_minor_unit": 2, "currency_decimal_separator": ",", "currency_thousand_separator": "", "currency_prefix": "", "currency_suffix": " ?", "raw_prices": { "precision": 6, "price": "739000000", "regular_price": "739000000", "sale_price": "739000000" } }, "totals": { "line_subtotal": "73900", "line_subtotal_tax": "0", "line_total": "73900", "line_total_tax": "0", "currency_code": "UAH", "currency_symbol": "?", "currency_minor_unit": 2, "currency_decimal_separator": ",", "currency_thousand_separator": "", "currency_prefix": "", "currency_suffix": " ?" }, "catalog_visibility": "visible", "extensions": {} } ], "coupons": [], "fees": [], "totals": { "total_items": "73900", "total_items_tax": "0", "total_fees": "0", "total_fees_tax": "0", "total_discount": "0", "total_discount_tax": "0", "total_shipping": "0", "total_shipping_tax": "0", "total_price": "73900", "total_tax": "0", "tax_lines": [], "currency_code": "UAH", "currency_symbol": "?", "currency_minor_unit": 2, "currency_decimal_separator": ",", "currency_thousand_separator": "", "currency_prefix": "", "currency_suffix": " ?" }, "shipping_address": {}, "billing_address": {}, "needs_payment": true, "needs_shipping": true, "payment_requirements": [ "products" ], "has_calculated_shipping": true, "shipping_rates": [ ], "items_count": 1, "items_weight": 0, "cross_sells": [], "errors": [ { "code": "woocommerce_rest_cart_coupon_error", "message": "The “cart discount” coupon has been removed from your cart: Coupon “cart discount” does not exist!" } ], "payment_methods": [], "extensions": {} }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Woocommerce cart API error’ is closed to new replies.