How to pass parameters to admin_notices?

So there is the following case. I need to display a name inside of admin_notices. class MyPlugin_Admin { public static function render_admin_notice() { echo $name . ‘ has been upgraded.’; } } add_action( ‘admin_notices’, array( ‘MyPlugin_Admin’, ‘render_admin_notice’ ) ); How to populate $name? I thougth of following solutions: No. 1: class MyPlugin_Admin { public static … Read more