mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Ensure terms and conditions page is selected before validate
This commit is contained in:
parent
8562fb7f58
commit
9bf0248153
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ class CreateOrderEndpoint implements EndpointInterface {
|
|||
if ( 'checkout' === $data['context'] ) {
|
||||
$this->validate_checkout_form( $data['form'], $order );
|
||||
}
|
||||
if ( 'pay-now' === $data['context'] ) {
|
||||
if ( 'pay-now' === $data['context'] && get_option( 'woocommerce_terms_page_id', '' ) !== '' ) {
|
||||
$this->validate_paynow_form( $data['form'] );
|
||||
}
|
||||
wp_send_json_success( $order->to_array() );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue