Merge pull request #1047 from woocommerce/pcp-1016-address-error

Fix shipping address validation
This commit is contained in:
Emili Castells 2022-12-01 11:58:09 +01:00 committed by GitHub
commit 6a3f96a1e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,6 +32,8 @@ class CheckoutFormValidator extends WC_Checkout {
foreach ( $data as $key => $value ) {
$_POST[ $key ] = $value;
}
// And we must call get_posted_data because it handles the shipping address.
$data = $this->get_posted_data();
// It throws some notices when checking fields etc., also from other plugins via hooks.
// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged