Website Building » WooCommerce » How Do I Disable the Terms and Conditions Checkbox in WooCommerce?

How Do I Disable the Terms and Conditions Checkbox in WooCommerce?

Last updated on January 23, 2023 @ 12:48 pm

There’s no denying that the Terms and Conditions checkbox is an important part of any online store. It ensures that your customers are aware of your store’s terms and conditions, and it protects you from any potential legal issues down the line.

However, there may be times when you need to disable the Terms and Conditions checkbox in WooCommerce. For example, if you’re running a promotion where customers can opt-in to receive marketing materials, you may not want them to be required to agree to your terms and conditions. Or, if you’re selling digital products, you may want to streamline the checkout process by removing the need for customers to agree to your terms and conditions.

Fortunately, disabling the Terms and Conditions checkbox in WooCommerce is relatively easy. All you need to do is add a simple piece of code to your functions.php file. Here’s how:

First, open up functions.php in your child theme or custom plugin. If you’re not sure how to do this, take a look at our guide on How to Edit WordPress Theme Files.

PRO TIP: If you are unsure about how to disable the Terms and Conditions checkbox in WooCommerce, it is best to leave it enabled. Disabling the Terms and Conditions checkbox can result in unexpected behavior and may cause problems with your store.

Once functions.php is open, add this code:

add_filter( 'woocommerce_terms_is_checked_default', '__return_false' );

This filter will disable the Terms and Conditions checkbox on the checkout page by default. Customers will still have the option to click the checkbox if they want to, but it won’t be required.

If you only want to disable the Terms and Conditions checkbox for certain products or product categories, you can use this code instead:

add_action( 'woocommerce_before_checkout_form', 'disable_terms' );
function disable_terms() {
remove_action( 'woocommerce_checkout_terms_and_conditions', 'wc_terms_and_conditions_page' );
}
Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.