jQuery(document).ready(function($) { // Function to hide any remaining old buttons function hideOldButtons() { $('.dokan-add-product-link, span.dokan-add-product-link, a[href*="dokan/products/new"]').hide(); } // Function to hide order, withdraw, and settings links function hideDisabledFunctionality() { $('.dokan-dashboard-menu li.orders, .dokan-dashboard-menu li.withdraw, .dokan-dashboard-menu li.settings').hide(); $('a[href*="orders"], a[href*="withdraw"], a[href*="settings"]').closest('li').hide(); } // Fix mobile navigation edges function fixMobileNavigation() { if ($(window).width() < 768) { $('.dokan-dash-sidebar, #dokan-navigation').css({ 'border-radius': '0', 'margin': '0', 'width': '100%' }); } } // Run all functions immediately hideOldButtons(); hideDisabledFunctionality(); fixMobileNavigation(); // Run periodically to catch any dynamically loaded elements var checkInterval = setInterval(function() { hideOldButtons(); hideDisabledFunctionality(); }, 500); // Stop checking after 5 seconds setTimeout(function() { clearInterval(checkInterval); }, 5000); // Run on resize $(window).resize(fixMobileNavigation); });

Main Menu