By using Elementorforum.com’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

Error Woocommerce : there was an error loading misc recommendations

Community

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.

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>
        ";
    }
});
 
P

pagan11460

New Member
Hello, my client is getting this message on her product pages. Where should I place this code?
 
Community

Community

Administrator
Staff member
You would add this to your Functions.php file or code snippets plugin.

Just make sure you've tested everything after.
 
P

pagan11460

New Member
Thank you. I'll probably have to try it tomorrow. I'll let you know. Can we keep this thread open?
 
Community

Community

Administrator
Staff member
Elementor Services Elementor Services

Latest posts

Latest Resources

Other Elementor Resources

elementor official
Top