Answer the question
In order to leave comments, you need to log in
I can't figure out why fetch fails on request?
Wrote a script to accept data from WP and send it to the frontpad (accounting system).
The problem is that I rewrote the packaging logic and fetch seems to send data, but it crashes with an internal error. It does not wait for a response from the server. When using the old code, everything works. The same data, the same fetch, but different packing logic. If there were no data inside at all, the server would return an error that there is no key that I am sending, so that it will let me through. What could be the reason for this behaviour? Help me please).
Old and new code here
Answer the question
In order to leave comments, you need to log in
const fullName = () => {
let fullName = "";
fullName += billing?.['first_name'] + " ";
fullName += billing?.['last_name'];
return fullName;
};
...
formData.append('name', fullName);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question