#sindur-error

1 messages · Page 1 of 1 (latest)

sturdy terrace
#

hi, looking

#

looks like a bug in the Woocommerce plugin you use really. You're not writing this code yourself

#

if you are, the problem is you are missing an array, it should be like 'shipping_address_countries' => ["US"],

iron lynx
#

As per this I send. like
"shipping_address_collection": {
"allowed_countries": "US"
},

and I got error saying. "invalid_request_error - shipping_address_collection[allowed_countries]
Invalid array"

sturdy terrace
#

yep

#

I told you above, you need to pass it as an array

#
 "shipping_address_collection": {
    "allowed_countries": ["US"] // <=== [ ... ]
  },
iron lynx
#

Oh okay! I got it

#

One more thing, I tried this it's working but when i pass both billing_address_collection and shipping_address_collection the checkout page only display shipping address fileds

#

See this

#

Req ID : req_3TNX73jIotljds

sturdy terrace
#

look at the checkbox at the bottom above the Pay button