Created
July 23, 2024 13:34
-
-
Save xlplugins/0226b48785b0559ab6d997ebe4ea53cc to your computer and use it in GitHub Desktop.
Funnelkit: Remove Admin notices
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
class WFACP_Admin_Remove_Notice { | |
public function __construct() { | |
if ( is_admin() ) { | |
add_action( 'admin_notices', array( $this, 'remove_admin_notice' ), 9 ); | |
} | |
} | |
public function remove_admin_notice() { | |
if ( class_exists( 'WFFN_Admin_Notifications' ) ) { | |
$instance = WFFN_Admin_Notifications::get_instance(); | |
if ( $instance instanceof WFFN_Admin_Notifications ) { | |
remove_action( 'admin_notices', array( $instance, 'register_notices' ) ); | |
} | |
} | |
} | |
} | |
new WFACP_Admin_Remove_Notice(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment