Please, may someone help me? I need change the name of a plugin installed in my wordpress (Only the name in the admin bar is fine ;) . Thanks!
Preview:
Navigate to the WordPress installation's wp-content directory. Open the plugins directory. Create a new directory and name it after the plugin (e.g. plugin-name ). Open the new plugin's directory.
Inside the wp-content folder, you will see a folder called plugins. This is where WordPress stores all plugins installed on your website. You need to right-click on the plugins folder and select Rename. Next, change the name of the plugins folder to anything that you like.
Here's the process to change the labels (I changed WooCommerce to "Stall" in my example).
You could try that with the gettext filter
in the following manner.
Use this in your functions.php file
function rename_header_to_logo( $translated, $original, $domain ) {
$strings = array(
'WooCommerce' => 'Stall',
'Custom Header' => 'Custom Stall'
);
if ( isset( $strings[$original] ) && is_admin() ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'rename_header_to_logo', 10, 3 );
Also you can apply below code
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'WooCommerce' :
$translated_text = __( 'Stall', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_text_strings', 20, 3 );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With