Getting Call to a member function toArray() on null error on saving address API
-
I am trying to save address after adding product to my cart but getting this error.
Anyone have idea about this issue how I can fix it.Thanks!
-
Hi @ali_infotech,
Please share with me the full request body and headers. So that I can check.
-
Thanks for your response. Its fixed now, I was passing address id without saving any address
-
I have same issue and I am also passing address id same in both shipping and billing..
-
This is because JSON is not sent properly. Please check your JSON request.
-
Thanks for your response .. It is working now
-
i have the same error how did u fix it?
here is my json body :
{
"billing": {
"address1": {
"0": ""
},
"use_for_shipping": "false",
"first_name": "john",
"last_name": "doe",
"email": "[email protected]",
"address_id": 1
},
"shipping": {
"address1": {
"0": ""
},
"first_name": "john",
"last_name": "doe",
"email": "[email protected]",
"address_id": 2
}
} -
same error