Only show T&C's notice if there is a valid T&Cs page
This commit is contained in:
parent
8bfb0a96d4
commit
0568470bb8
|
@ -693,7 +693,7 @@ class WC_Checkout {
|
|||
$this->validate_posted_data( $data, $errors );
|
||||
$this->check_cart_items();
|
||||
|
||||
if ( empty( $data['woocommerce_checkout_update_totals'] ) && empty( $data['terms'] ) && apply_filters( 'woocommerce_checkout_show_terms', wc_get_page_id( 'terms' ) > 0 ) ) {
|
||||
if ( empty( $data['woocommerce_checkout_update_totals'] ) && ! empty( $_POST['terms-field'] ) && empty( $data['terms'] ) && apply_filters( 'woocommerce_checkout_show_terms', wc_get_page_id( 'terms' ) > 0 ) ) {
|
||||
$errors->add( 'terms', __( 'You must accept our Terms & Conditions.', 'woocommerce' ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue