From 902d6bb0cf25f1aa2c5265f9ed72735d3aea66eb Mon Sep 17 00:00:00 2001 From: dinamiko Date: Mon, 8 Nov 2021 15:09:22 +0100 Subject: [PATCH] Check if terms checkbox is available --- modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php b/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php index 897344f2c..4a7f63348 100644 --- a/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php +++ b/modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php @@ -381,7 +381,7 @@ class CreateOrderEndpoint implements EndpointInterface { */ private function validate_paynow_form( string $form_values ) { $parsed_values = wp_parse_args( $form_values ); - if ( ! isset( $parsed_values['terms'] ) ) { + if ( isset( $parsed_values['terms-field'] ) && ! isset( $parsed_values['terms'] ) ) { throw new \RuntimeException( __( 'Please read and accept the terms and conditions to proceed with your order.', 'woocommerce-paypal-payments' ) );