Created
April 23, 2015 16:38
-
-
Save chrisvanpatten/b2aca52932d7efde8f7c to your computer and use it in GitHub Desktop.
Suppress WooCommerce nags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Suppress certain WooCommerce admin notices | |
*/ | |
function suppress_woocommerce_nags() { | |
if ( class_exists( 'WC_Admin_Notices' ) ) { | |
// Remove the "you have outdated template files" nag | |
WC_Admin_Notices::remove_notice( 'template_files' ); | |
// Remove the "install pages" nag | |
WC_Admin_Notices::remove_notice( 'install' ); | |
} | |
} | |
add_action( 'wp_loaded', 'suppress_woocommerce_nags', 99 ); | |
/** | |
* Hide the "install the WooThemes Updater" nag | |
*/ | |
remove_action( 'admin_notices', 'woothemes_updater_notice' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment