If you want to add another checkbox option for terms and conditions similar to the checkbox for privacy policy so that customers need to agree to your terms and conditions as part of the booking process then you can fulfill your requirement with WP Travel.

You can add a checkbox option for terms and conditions too with a checkbox option for the privacy policy on the checkout page as part of the booking process using filter code.

add another checkbox option for terms and conditions

To add another checkbox option similar to the privacy policy checkbox as mentioned above, you have to add the following given filter code in the functions.php file of your child theme.

function wp_travel_customized_checkout_fields( $checkout_fields ) {
	
	$checkout_fields['payment_fields']['terms'] = array(
			'type'              => 'checkbox',
			'label'             => __( 'Terms & condition', 'wp-travel' ),
			'options'           => array( 'terms' => __( 'You must agree the terms and condition <a href= "#">Terms & Condition page</a>.' ) ),
			'name'              => 'wp_travel_checkout_terms',
			'id'                => 'wp-travel-checkout-terms',
			'validations'       => array(
				'required' => true,
			),
			'option_attributes' => array(
				'required' => true,
			),
			'priority'          => 440,
		);
	return $checkout_fields;
}
add_filter( 'wp_travel_checkout_fields', 'wp_travel_customized_checkout_fields' );

Note: You can replace Terms  & condition label and You must agree the terms and condition <a href = “link to page”> Terms & Condition Page </a> text mentioned in code as per your requirement.

For detail information regarding how to create a child theme, please refer to our Knowledgebase.

Output

add another checkbox option for terms and conditions

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Further, if you have any queries, please submit them to our Contact page.