Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Created October 30, 2020 05:46
Show Gist options
  • Select an option

  • Save yousufansa/d8d0c6a991293de4ea14611b8507061e to your computer and use it in GitHub Desktop.

Select an option

Save yousufansa/d8d0c6a991293de4ea14611b8507061e to your computer and use it in GitHub Desktop.
Cartzilla - Remove Dokan Pro Header My Account Dropdown Menu Items in Marketplace Header
if ( ! function_exists( 'cz_child_modify_my_account_dokan_dropdown_menu_items' ) ) {
function cz_child_modify_my_account_dokan_dropdown_menu_items( $menu_items ) {
if( isset( $menu_items['followers'] ) ) {
unset( $menu_items['followers'] );
}
if( isset( $menu_items['coupons'] ) ) {
unset( $menu_items['coupons'] );
}
if( isset( $menu_items['reviews'] ) ) {
unset( $menu_items['reviews'] );
}
if( isset( $menu_items['reports'] ) ) {
unset( $menu_items['reports'] );
}
if( isset( $menu_items['support'] ) ) {
unset( $menu_items['support'] );
}
if( isset( $menu_items['tools'] ) ) {
unset( $menu_items['tools'] );
}
if( isset( $menu_items['verification'] ) ) {
unset( $menu_items['verification'] );
}
if( isset( $menu_items['shipping'] ) ) {
unset( $menu_items['shipping'] );
}
if( isset( $menu_items['shipstation'] ) ) {
unset( $menu_items['shipstation'] );
}
if( isset( $menu_items['social'] ) ) {
unset( $menu_items['social'] );
}
if( isset( $menu_items['seo'] ) ) {
unset( $menu_items['seo'] );
}
if( isset( $menu_items['rma'] ) ) {
unset( $menu_items['rma'] );
}
if( isset( $menu_items['return-request'] ) ) {
unset( $menu_items['return-request'] );
}
return $menu_items;
}
}
add_filter( 'cartzilla_my_account_dokan_dropdown_menu_items', 'cz_child_modify_my_account_dokan_dropdown_menu_items' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment