How can I rename WooCommerce submenus in admin dashboard?
up vote
0
down vote
favorite
I'm trying to rename the first element from the WooCommerce submenu. This is what I've tried:
add_action( 'admin_menu', 'rename_woocoomerce_menus', 999 );
function rename_woocoomerce_menus()
global $menu;
global $submenu;
$woo = rename_woocommerce( 'WooCommerce', $menu );
// Validate
if ( ! $woo )
return;
$submenu[ $woo ][0] = 'Laped';
function rename_woocommerce( $needle, $haystack )
foreach ( $haystack as $key => $value )
$current_key = $key;
if (
$needle === $value
OR (
is_array( $value )
&& rename_woocommerce( $needle, $value ) !== false
)
)
return $current_key;
return false;
So I'm trying to rename the first submenu in WooCommerce from Orders to Laped. When I save the code I'm getting no error but the name is still Orders.
php wordpress woocommerce
add a comment |
up vote
0
down vote
favorite
I'm trying to rename the first element from the WooCommerce submenu. This is what I've tried:
add_action( 'admin_menu', 'rename_woocoomerce_menus', 999 );
function rename_woocoomerce_menus()
global $menu;
global $submenu;
$woo = rename_woocommerce( 'WooCommerce', $menu );
// Validate
if ( ! $woo )
return;
$submenu[ $woo ][0] = 'Laped';
function rename_woocommerce( $needle, $haystack )
foreach ( $haystack as $key => $value )
$current_key = $key;
if (
$needle === $value
OR (
is_array( $value )
&& rename_woocommerce( $needle, $value ) !== false
)
)
return $current_key;
return false;
So I'm trying to rename the first submenu in WooCommerce from Orders to Laped. When I save the code I'm getting no error but the name is still Orders.
php wordpress woocommerce
Thank you all for your help :D
– Mr. Jo
Nov 10 at 14:30
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to rename the first element from the WooCommerce submenu. This is what I've tried:
add_action( 'admin_menu', 'rename_woocoomerce_menus', 999 );
function rename_woocoomerce_menus()
global $menu;
global $submenu;
$woo = rename_woocommerce( 'WooCommerce', $menu );
// Validate
if ( ! $woo )
return;
$submenu[ $woo ][0] = 'Laped';
function rename_woocommerce( $needle, $haystack )
foreach ( $haystack as $key => $value )
$current_key = $key;
if (
$needle === $value
OR (
is_array( $value )
&& rename_woocommerce( $needle, $value ) !== false
)
)
return $current_key;
return false;
So I'm trying to rename the first submenu in WooCommerce from Orders to Laped. When I save the code I'm getting no error but the name is still Orders.
php wordpress woocommerce
I'm trying to rename the first element from the WooCommerce submenu. This is what I've tried:
add_action( 'admin_menu', 'rename_woocoomerce_menus', 999 );
function rename_woocoomerce_menus()
global $menu;
global $submenu;
$woo = rename_woocommerce( 'WooCommerce', $menu );
// Validate
if ( ! $woo )
return;
$submenu[ $woo ][0] = 'Laped';
function rename_woocommerce( $needle, $haystack )
foreach ( $haystack as $key => $value )
$current_key = $key;
if (
$needle === $value
OR (
is_array( $value )
&& rename_woocommerce( $needle, $value ) !== false
)
)
return $current_key;
return false;
So I'm trying to rename the first submenu in WooCommerce from Orders to Laped. When I save the code I'm getting no error but the name is still Orders.
php wordpress woocommerce
php wordpress woocommerce
asked Nov 9 at 22:08
Mr. Jo
34019
34019
Thank you all for your help :D
– Mr. Jo
Nov 10 at 14:30
add a comment |
Thank you all for your help :D
– Mr. Jo
Nov 10 at 14:30
Thank you all for your help :D
– Mr. Jo
Nov 10 at 14:30
Thank you all for your help :D
– Mr. Jo
Nov 10 at 14:30
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233880%2fhow-can-i-rename-woocommerce-submenus-in-admin-dashboard%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Thank you all for your help :D
– Mr. Jo
Nov 10 at 14:30