Monthly Archives: March 2021

woocommerce – “I have read and agree to the website” always in english

This code that i’v found on github worked for me

if (!function_exists('My_terms_and_conditions_checkbox_text')) {
    function My_terms_and_conditions_checkbox_text( ) {
        return sprintf( __( 'I have read and agree to the website %s', 'woocommerce' ), '[terms]' ) ;
    }
}
add_filter('woocommerce_get_terms_and_conditions_checkbox_text', 'My_terms_and_conditions_checkbox_text', 10, 3);

https://github.com/woocommerce/woocommerce/issues/22127#issue-387480392