Skip to content

Instantly share code, notes, and snippets.

@WpComet
Created August 8, 2023 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WpComet/f0616a0a503f61fa1d7d643e83c6660a to your computer and use it in GitHub Desktop.
Save WpComet/f0616a0a503f61fa1d7d643e83c6660a to your computer and use it in GitHub Desktop.
Dismissing a stuck woocommerce notice
add_action( 'admin_notices', 'fix_wc_notice_472021' );
/*
* Change notice 'name' as needed.
*/
function fix_wc_notice_472021() {
global $wpdb;
$wpdb->update( $wpdb->prefix . 'wc_admin_notes', ['status'=>'actioned'], ['name'=>'woocommerce-core-paypal-march-2022-updated'] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment