Skip to content

Instantly share code, notes, and snippets.

@fervous
Forked from digitalchild/functions.php
Last active October 22, 2016 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fervous/29670e4f5a68ef5cc9e099b42fa9a349 to your computer and use it in GitHub Desktop.
Save fervous/29670e4f5a68ef5cc9e099b42fa9a349 to your computer and use it in GitHub Desktop.
Change WC Vendors Pro Dashboard navigation labels
// Put this code in your theme or child theme functions.php
// Rename the main dashboard tab labels
function change_dashboard_labels( $dashboard_urls ){
// Products
if ( array_key_exists('product', $dashboard_urls ) ) $dashboard_urls[ 'product' ][ 'label' ] = 'Mah Products';
// Orders
if ( array_key_exists('order', $dashboard_urls ) )$dashboard_urls[ 'order' ][ 'label' ] = 'Mah Orders';
// Settings
if ( array_key_exists('settings', $dashboard_urls ) )$dashboard_urls[ 'settings' ][ 'label' ] = 'Mah Settings';
// Ratings
if ( array_key_exists('rating', $dashboard_urls ) )$dashboard_urls[ 'rating' ][ 'label' ] = 'Mah Ratins';
// Coupons
if ( array_key_exists('shop_coupon', $dashboard_urls ) )$dashboard_urls[ 'shop_coupon' ][ 'label' ] = 'Mah Coupons';
return $dashboard_urls;
}
add_filter( 'wcv_pro_dashboard_urls', 'change_dashboard_labels' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment