-
-
Save fervous/29670e4f5a68ef5cc9e099b42fa9a349 to your computer and use it in GitHub Desktop.
Change WC Vendors Pro Dashboard navigation labels
This file contains 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
// 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