File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -519,7 +519,8 @@ public function addPaymentMethodMandatoryFieldsPhoneVerification(
519
519
$ fields ['billing_phone ' ] = null ;
520
520
return $ fields ;
521
521
}
522
- $ fieldPosted = !empty ($ _POST [$ field ]) ? sanitize_text_field ($ _POST [$ field ]) : false ;
522
+ // phpcs:ignore WordPress.Security.NonceVerification.Missing
523
+ $ fieldPosted = !empty ($ _POST [$ field ]) ? sanitize_text_field (wp_unslash ($ _POST [$ field ])) : false ;
523
524
524
525
if ($ fieldPosted && $ this ->isPhoneValid ($ fieldPosted )) {
525
526
$ fields ['billing_phone ' ] = $ fieldPosted ;
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public function isMollieFraudException(ApiException $e): bool
107
107
public function isUnprocessablePhoneException (ApiException $ e ): bool
108
108
{
109
109
$ isUnprocessablePhoneCode = $ e ->getCode () === 422 ;
110
- $ isUnprocessablePhoneMessage = strpos ($ e ->getMessage (), 'phone number is invalid ' )!== false ;
110
+ $ isUnprocessablePhoneMessage = strpos ($ e ->getMessage (), 'phone number is invalid ' ) !== false ;
111
111
112
112
if ($ isUnprocessablePhoneCode && $ isUnprocessablePhoneMessage ) {
113
113
return true ;
You can’t perform that action at this time.
0 commit comments