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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.