Hi. Is there an update to these two snippets below? I cant seem to get either working in child/ functions.php. Im using themeco’s custom field editor addon. Could this be affecting it?
The translation i need is simple “Please agree to our terms”
Cheers
Snippet 1:
//Customise Terms & Conditions box
add_filter(‘gettext’, ‘x_translated_text’ );
function x_translated_text($translated) {
$your_translation = “Insert your translation here”;
$translated = str_ireplace(‘I’ve read and accept the terms & conditions’, $your_translation, $translated);
return $translated;
}
Snippet 2:
function translate_texts($translated) {
$translated = str_ireplace(‘I’ve read and accept the <a href="%s" target="_blank" ““class=“woocommerce-terms-and-conditions-link”>terms & conditions’, ‘Perskaičiau ir sutinku su <a href=”%s” target="_blank" ""class=“woocommerce-terms-and-conditions-link”>sąlygomis ir taisyklėmis’, $translated);$translated);
return $translated;
}
add_filter(‘gettext’, ‘translate_texts’ );
