Skip to content

Instantly share code, notes, and snippets.

@10horizons
Created April 27, 2021 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 10horizons/92153c4d698d34314f30a1ae4d5e124a to your computer and use it in GitHub Desktop.
Save 10horizons/92153c4d698d34314f30a1ae4d5e124a to your computer and use it in GitHub Desktop.
<?php
function thp_wup_custom_change_strings( $translated_text, $text, $domain ) {
if ($domain == 'very-simple-woocommerce-upsell-popup') {
switch ($translated_text) {
case 'The item has been added to cart. Thank you!' :
$translated_text = __( 'Der Artikel wurde in den Warenkorb gelegt. Vielen Dank!', 'very-simple-woocommerce-upsell-popup' );
break;
case 'Would you also be interested in this item?':
$translated_text = __('Würden Sie sich auch für diesen Artikel interessieren?', 'very-simple-woocommerce-upsell-popup');
break;
}
}
return $translated_text;
}
add_filter( 'gettext', 'thp_wup_custom_change_strings', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment