Skip to content

Instantly share code, notes, and snippets.

@fervous
Created January 27, 2018 02:50
Show Gist options
  • Save fervous/6ca814fd2c31a4f2643cfd49df1b3dba to your computer and use it in GitHub Desktop.
Save fervous/6ca814fd2c31a4f2643cfd49df1b3dba to your computer and use it in GitHub Desktop.
translate strings WC Vendors Pro
/* store and stores to table and tables */
add_filter( 'gettext', 'wcv_translate_store', 999 );
function wcv_translate_store( $translated ) {
$translated = str_ireplace( 'Store', 'Table', $translated );
return $translated;
}
add_filter( 'gettext', 'wcv_translate_stores', 999 );
function wcv_translate_stores( $translated ) {
$translated = str_ireplace( 'Stores', 'Tables', $translated );
return $translated;
}
/* vendor and vendors to maker and makers */
add_filter( 'gettext', 'wcv_translate_vendor', 999 );
function wcv_translate_vendor( $translated ) {
$translated = str_ireplace( 'vendor', 'Maker', $translated );
return $translated;
}
add_filter( 'gettext', 'wcv_translate_vendor', 999 );
function wcv_translate_vendors( $translated ) {
$translated = str_ireplace( 'vendors', 'Makers', $translated );
return $translated;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment