Make the WooCommerce Terms & Conditions checkbox checked by default

this code is working on woocommerce 3.x and it is test on
woocommerce 3.1.0 with WordPress 4.8

just go to function.php file on your theme and add this code


function razztech_wc_terms( $terms_is_checked ) { return true;}
add_filter( 'woocommerce_terms_is_checked', 'razztech_wc_terms', 10 );
add_filter( 'woocommerce_terms_is_checked_default', 'razztech_wc_terms', 10 );

and now it should check it by default

Advertisements