On WordPress checkout page, I want to make the "I have read and agree to the website terms and conditions" default clicked. Users can unclick the check icon. Is there any code available?
On WordPress checkout page, I want to make the "I have read and agree to the website terms and conditions" default clicked. Users can unclick the check icon. Is there any code available?
Share Improve this question asked Mar 16, 2022 at 8:28 Imtango30Imtango30 425 bronze badges 3- There is a template for that you can override, terms.php. Just make sure to not edit the core woocommerece files, you would need to create a override, they explain in the comments – Buttered_Toast Commented Mar 16, 2022 at 8:41
- Hi @Buttered_Toast, can't it be done via functions? – Imtango30 Commented Mar 16, 2022 at 8:49
- WordPress doesn't have a checkout. Are you using a plugin? Presumably WooCommerce. Please note that while @Buttered_Toast and Zeshan were kind enough to give you information, third party plugins such as WooCommerce are off topic here. – Jacob Peattie Commented Mar 16, 2022 at 12:23
1 Answer
Reset to default 0Try this snippet in functions.php for your child theme
add_filter( 'woocommerce_terms_is_checked_default', '__return_true' );