mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Fix complex form data during form saving
Similarly to #1510, sending encoded form and using parse_str for FormSaver, which was still using the old way.
This commit is contained in:
parent
bd974a7922
commit
5c3be69c78
1 changed files with 1 additions and 2 deletions
|
@ -6,7 +6,6 @@ export default class FormSaver {
|
|||
|
||||
async save(form) {
|
||||
const formData = new FormData(form);
|
||||
const formJsonObj = Object.fromEntries(formData.entries());
|
||||
|
||||
const res = await fetch(this.url, {
|
||||
method: 'POST',
|
||||
|
@ -16,7 +15,7 @@ export default class FormSaver {
|
|||
credentials: 'same-origin',
|
||||
body: JSON.stringify({
|
||||
nonce: this.nonce,
|
||||
form: formJsonObj,
|
||||
form_encoded: new URLSearchParams(formData).toString(),
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue