I read carefully How to display notice in admin panel on Plugin Activation? which is similar, but I could not make it work correctly
class Shoutbox {
function display_notice() {
echo '<div class="updated">
<p>I am a little yellow notice.</p>
</div>';
}
public static function pluginActivated() {
//exit("Plugin has been actived"); // this is displayed when not commented
add_action('admin_notices','display_notice'); // this notice is never displayed.
}
}
//add_action('admin_notices', array('Shoutbox', 'display_notice')); // this is displayed when not commented
new Shoutbox();
I also tried with
public static function display_notice() {
Any idea on how to display the admin notice inside pluginActivated() ?