mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge remote-tracking branch 'origin/trunk' into PCP-121-remove-plugin-data-after-uninstalling
This commit is contained in:
commit
7563c2a0fe
3 changed files with 7 additions and 1 deletions
|
@ -248,7 +248,11 @@ class CreateOrderEndpoint implements EndpointInterface {
|
|||
|
||||
$form_fields = $data['form'] ?? null;
|
||||
|
||||
if ( $this->early_validation_enabled && is_array( $form_fields ) ) {
|
||||
if ( $this->early_validation_enabled
|
||||
&& is_array( $form_fields )
|
||||
&& 'checkout' === $data['context']
|
||||
&& in_array( $payment_method, array( PayPalGateway::ID, CardButtonGateway::ID ), true )
|
||||
) {
|
||||
$this->validate_form( $form_fields );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue