Code Duplication    Length = 3-4 lines in 2 locations

includes/wpinv-invoice-functions.php 2 locations

@@ 1134-1136 (lines=3) @@
1131
    $page = wpinv_get_option( 'tandc_page' );
1132
    if(isset($page) && (int)$page > 0 && apply_filters( 'wpinv_checkout_show_terms', true )){
1133
        // Validate agree to terms
1134
        if ( ! isset( $_POST['wpi_terms'] ) || !$_POST['wpi_terms'] ) {
1135
            wpinv_set_error( 'accept_terms', apply_filters( 'wpinv_accept_terms_error_text', __( 'You must accept terms and conditions', 'invoicing' ) ) );
1136
        }
1137
    }
1138
    
1139
    $valid_data['invoice_user'] = wpinv_checkout_validate_invoice_user();
@@ 1409-1412 (lines=4) @@
1406
1407
function wpinv_checkout_validate_agree_to_terms() {
1408
    // Validate agree to terms
1409
    if ( ! isset( $_POST['wpi_agree_to_terms'] ) || $_POST['wpi_agree_to_terms'] != 1 ) {
1410
        // User did not agree
1411
        wpinv_set_error( 'agree_to_terms', apply_filters( 'wpinv_agree_to_terms_text', __( 'You must agree to the terms of use', 'invoicing' ) ) );
1412
    }
1413
}
1414
1415
function wpinv_checkout_validate_invoice_user() {