Advertisement
wclovers

[Issue] WooCommerce menu hidden when WCFM-Marketplace plugin active

Apr 14th, 2022
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. add_action('admin_menu', function() {
  2.     if( !apply_filters('wcfmmp_is_allow_admin_menu', true) ) return;
  3.    
  4.     global $WCFMmp, $menu;
  5.    
  6.     remove_action('admin_menu', array($WCFMmp->admin, 'wcfmmp_options_page'));
  7.  
  8.     if (function_exists('get_wcfm_settings_url')) {
  9.         add_menu_page(__('Marketplace', 'wc-multivendor-marketplace'), __('Marketplace', 'wc-multivendor-marketplace'), 'manage_options', 'wcfm_settings_form_marketplace_head', null, null, '54');
  10.         $menu[54] = array(__('Marketplace', 'wc-multivendor-marketplace'), 'manage_options', get_wcfm_settings_url() . '#wcfm_settings_form_marketplace_head', '', 'open-if-no-js menu-top', '', $WCFMmp->plugin_url . 'assets/images/wcfmmp_icon.svg');
  11.     }
  12. }, 9);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement