WooCommerce displays the terms and conditions acceptance checkbox on the payment form of the checkout page. The checkbox field is a requirement before placing an order. If a customer wants to read the terms and conditions, it is displayed in the small area of the payment form. As a result, it is hard to read and scroll through. This tutorial will show you how to open the WooCommerce terms and conditions link in a new tab on the checkout page.
WooCommerce Terms and Conditions Checkbox
WooCommerce uses an accordion effect to display the terms and conditions on the checkout page. The area expands when clicking the terms and conditions link. Consequently, this makes the WooCommerce terms and conditions difficult to read and may frustrate customers.
Copy and paste the following PHP code snippet into the functions.php file of your active parent theme or child theme.
The PHP code snippet does two things. First, it removes the accordion effect from the terms and conditions checkbox field. This is done by unhooking the function wc_terms_and_conditions_page_content from the action woocommerce_checkout_terms_and_conditions. Secondly, the code snippet will force the terms and conditions link to open in a new tab.
Need help? Our WordPress Development Service is a comprehensive solution for small, medium, and enterprise-level businesses. Call us at 602-633-4758 for a free consultation.