Last active
March 6, 2024 10:35
-
-
Save codersaiful/f61935c65bd19a0ebf0f5d5ccedb6c36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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