Skip to content

Instantly share code, notes, and snippets.

@jamesgol
Created February 7, 2018 22:31
Show Gist options
  • Save jamesgol/605898274b696c3081bafad049ad606b to your computer and use it in GitHub Desktop.
Save jamesgol/605898274b696c3081bafad049ad606b to your computer and use it in GitHub Desktop.
Stop WooCommerce.com nag
add_filter( 'woocommerce_helper_suppress_admin_notices', 'jmg_woocommerce_helper_suppress_admin_notices' );
// Don't show the 'Connect your store to WooCommerce.com to receive extensions updates and support.' nag
function jmg_woocommerce_helper_suppress_admin_notices( $default ) {
return true;
}
@jamesgol
Copy link
Author

jamesgol commented Feb 7, 2018

I always forget about the WordPress __return_true() helper function. A cleaned method as posted by Marco Almeida is:
add_filter( 'woocommerce_helper_suppress_admin_notices', '__return_true' );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment