Skip to content

Instantly share code, notes, and snippets.

Last active Oct 30, 2017
What would you like to do?
WooCommerce: Hide Core notice
add_filter( 'woocommerce_show_admin_notice', 'prefix_show_updated_notice', 10, 2 );
function prefix_show_updated_notice( $show, $notice ) {
// Check for the notice you want to hide
// Refer to the WC_Admin_Notices::$code_notices (array keys) for the values
// Update notice?
if ( 'update' != $notice ) {
return $show;
// You can check for WC version in case you want to hide the notices
// only for the current version or a specific version
if ( version_compare( WC_VERSION, '3.2.1', '>' ) ) {
return $show;
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment