mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Set $_REQUEST before validation
This commit is contained in:
parent
fddd6c35e9
commit
b10f1a693a
1 changed files with 3 additions and 2 deletions
|
@ -27,10 +27,11 @@ class CheckoutFormValidator extends WC_Checkout {
|
|||
public function validate( array $data ) {
|
||||
$errors = new WP_Error();
|
||||
|
||||
// Some plugins check their fields using $_POST,
|
||||
// Some plugins check their fields using $_POST or $_REQUEST,
|
||||
// also WC terms checkbox https://github.com/woocommerce/woocommerce/issues/35328 .
|
||||
foreach ( $data as $key => $value ) {
|
||||
$_POST[ $key ] = $value;
|
||||
$_POST[ $key ] = $value;
|
||||
$_REQUEST[ $key ] = $value;
|
||||
}
|
||||
// And we must call get_posted_data because it handles the shipping address.
|
||||
$data = $this->get_posted_data();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue