How to disable JetPack nag messages in the WordPress Admin interface

- by

I really like WordPress, and I really like JetPack. I use the plugin on many client websites, who usually have their own WordPress.com  account, which is necessary to enable the plugin successfully.

Most of them however choose not to sign up for a payment plan, which as of 2017 leads to (now rather annoyingly frequent) JetPack upsell messages at the top of the admin screen. So I as the administrator, am constantly exposed to such messages, and I was wondering how to suppress them – not being the target audience here.

Thanks to a super helpful article by Matt Medeiros I found a great solution with this one-liner of code he as kindly supplied on his website, together with his opinion on such messages:

/* remove JetPack upsell messages */
/* https://mattreport.com/disable-jetpack-upsell-ads/ */
add_filter( 'jetpack_just_in_time_msgs', '__return_false' );

Add this to your child theme’s functions.php file and those admin nags are history!

Thanks Matt!



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

10 thoughts on “How to disable JetPack nag messages in the WordPress Admin interface”

  1. It’s working fine for me in its current state on many WordPress installations. What trouble are you having?

  2. D’oh!
    Thank you so much for bringing this to my attention – sometimes WordPress does weird things when pasting code. I’ve corrected the code above!

  3. The second argument in a hook is a function name (“callback”) to invoke. In this case, __return_false() is a special function in WP Core that does exactly as it says—returns FALSE. The reason it was likely working in spite of the mistake is that a bad function name would produce a notice/warning, but not a fatal error, which in either case is enough to change the TRUE value originally passed to the filter to something other than TRUE, causing it to abort execution.

  4. Ah, thank you so much for clarifying this – it makes perfect sense. I would have probably seen those warnings with DEBUG mode on, which was not active. I really appreciate you taking the time to share this 🙂

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.