Can we disable or hide Cost Tracker and other features we don't use?

Hello,

I’m wondering if there is a way to disable the Cost Tracker feature in MainWP, and other features we don’t use such as site backups, security, etc. For example, I don’t use the Cost tracker, and I use backups on my platform so I don’t need MainWP handling any backups. How can I remove these features/menus from MainWP? Ideally it’d be more formal and not just hiding it via CSS codes, but I understand if that’s the only way to achieve it.

1 Like

Hey @d19dotca

The development team has shared these hooks for removing those menu entries. At this time, it is not possible to “disable” those features entirely.

The easiest way of adding these hooks is using our Custom Dashboard extension. Alternatively, you can add them to the functions.php file.

if ( ! defined( 'MAINWP_MODULE_COST_TRACKER_ENABLED' ) ) {
    define( 'MAINWP_MODULE_COST_TRACKER_ENABLED', false );
}

add_filter('mainwp_menu_extensions_left_menu', 'mycustom2_mainwp_menu_extensions_left_menu');
function mycustom2_mainwp_menu_extensions_left_menu( $menus ){
    $new_menus = array();
    foreach($menus as $item ){
        if( !empty( $item['slug']) && 'Extensions-Mainwp-Backups' === $item['slug'] ){
            continue;
        }
        if( !empty( $item['parent_key']) && 'Extensions-Mainwp-Backups' === $item['slug'] ){
            continue;
        }
        $new_menus[] = $item;
    }
    return $new_menus;
}
1 Like