Add basic input validation before opening PayPal popup

This commit is contained in:
Alex P 2022-06-03 10:50:54 +03:00
parent 77230fefa8
commit 993e109c49
2 changed files with 17 additions and 0 deletions

View file

@ -843,6 +843,10 @@ class SmartButton implements SmartButtonInterface {
'Something went wrong. Please try again or choose another payment source.',
'woocommerce-paypal-payments'
),
'js_validation' => __(
'Required form fields are not filled or invalid.',
'woocommerce-paypal-payments'
),
),
),
'order_id' => 'pay-now' === $this->context() ? absint( $wp->query_vars['order-pay'] ) : 0,