Skip to content

FluentCart: customer_address_select crashes with null checkout_data #4

@vcode-sh

Description

@vcode-sh

Summary

The customer address select endpoint crashes when called via the REST API. It attempts to assign a property on a null object.

Reproduction

curl -s -u "admin:APP_PASSWORD" \
  "https://your-site.com/wp-json/fluent-cart/v2/customers/1/update-address-select"

Response: {"message":"Attempt to assign property \"checkout_data\" on null"} (HTTP 500)

Root Cause

The endpoint is designed for frontend sessions (cookie auth) where checkout session data exists. When called via REST API (Basic auth), the checkout session is null, causing the property assignment to crash.

Affected Version

FluentCart 1.3.9

Workaround

Use customer_addresses to get all addresses for a customer and filter client-side.

MCP Impact

fluentcart_customer_address_select tool documents this limitation. Users are directed to customer_addresses instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfluentcart-mcpFluentCart MCP ServerupstreamFluentCart upstream bug — cannot fix from MCP side

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions