Skip to content

Instantly share code, notes, and snippets.

@codersaiful
Last active March 6, 2024 10:35
Show Gist options
  • Save codersaiful/f61935c65bd19a0ebf0f5d5ccedb6c36 to your computer and use it in GitHub Desktop.
Save codersaiful/f61935c65bd19a0ebf0f5d5ccedb6c36 to your computer and use it in GitHub Desktop.
<?php
add_filter('gettext', 'wpt_custom_specific_text_change', 10, 3);
function wpt_custom_specific_text_change($translation, $text, $domain) {
if ($domain !== 'woo-product-table') return $translation;
// Check if the original translation text matches "Your Text"
if ($translation === 'Your Text') {
return 'Your Custom Text'; // Replace with your custom text
}
return $translation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment