woocommerce-paypal-payments/modules/ppcp-button/resources
Alex P 639e8409c8
Handle complex form fields when submitting checkout form
Our current way of handling the checkout form via ajax does not match the WC behavior which submits them in urlencoded request instead of JSON. When it is submitted as JSON object PHP does not parse it for $_POST etc., and we do not get its handling of arrays, breaking some plugin.
Now submitting the form as an urlencoded string inside JSON and parsing via `parse_str` which seems to handle it the same as $_POST.
The parsing is handled in `RequestData` to avoid duplicating it in multiple places and to keep our weird sanitization here. Not sure if it's a good idea to sanitize so early, but for now keeping it like this to avoid major refactoring or introducing new vulnerabilities.
2023-07-13 14:43:14 +03:00
..
css Add CSS file for non-DCC rules 2022-10-20 13:13:42 +03:00
js Handle complex form fields when submitting checkout form 2023-07-13 14:43:14 +03:00