Website Building » WooCommerce » How Do I Get Rid of WooCommerce Notices?

How Do I Get Rid of WooCommerce Notices?

Last updated on January 17, 2023 @ 1:55 pm

If you’re using WooCommerce and have notices that won’t go away, here’s how to get rid of them.

1. Go to WooCommerce > Settings > Advanced > Page setup and select “Don’t display WooCommerce system pages”

This will disable all WooCommerce pages, including the My Account page, which is where most users see their notices. If you don’t want to disable all WooCommerce pages, you can also deselect “My Account” from the list of pages to disable.

2. Go to WooCommerce > Status > Tools and select the “Clear transients” tool

This will remove all stored data in the WordPress database that’s no longer needed. This includes things like expired transients, which can cause notices to appear.

3. Add the following code to your functions.php file<
function wc_nag_ignore() {update_option( ‘wc_admin_notices’, array() );}
add_action( ‘admin_init’, ‘wc_nag_ignore’ );

This code will remove any existing notices from the database and prevent new ones from being added. You can add this code to your child theme’s functions.php file or a custom plugin.

Conclusion:

If you’re using WooCommerce and have notices that won’t go away, you can disable all WooCommerce pages, clear transients, or add code to your functions.php file to remove them.

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.