Skip to content

Instantly share code, notes, and snippets.

@kish2011
Created April 16, 2022 03:28
Show Gist options
  • Save kish2011/c918007692a3201f0d23eaaf9817cc84 to your computer and use it in GitHub Desktop.
Save kish2011/c918007692a3201f0d23eaaf9817cc84 to your computer and use it in GitHub Desktop.
remove notices of hello dolly plugin.
add_action( 'admin_head', 'remove_notices');
function remove_notices() {
$current_screen = get_current_screen();
if ( $current_screen && ( 'woocommerce_page_trackipal/trackipal-admin' === $current_screen->id ) ) {
// Hello Dolly.
if ( function_exists( 'hello_dolly' ) ) {
remove_action( 'admin_notices', 'hello_dolly' );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment