
Community
Administrator
Staff member
This error seems to popup for "Shop Manager" roles on some setups, Im assuming because shop manager doesnt have the permissions to view recommendations from the Woocommerce admin marketplace.
This normally shows on order pages for shop managers. We've written this bit of code to over come this for now as our shop managers don't need the snackbar notifications.
This normally shows on order pages for shop managers. We've written this bit of code to over come this for now as our shop managers don't need the snackbar notifications.
PHP:
add_action('admin_head', function(){if (current_user_can('shop_manager')){echo "
<script>
document.addEventListener('DOMContentLoaded', function(){const snackbarList = document.querySelector('.components-snackbar-list.woocommerce-transient-notices');
if (snackbarList){snackbarList.style.display = 'none';
}
});
</script>
";
}
});