• I’m trying to display a “once only” message after activating a plugin. Currently I use

    function plugin_welcome_message() {
    	echo "some html";
    }
    if ($plugin_detected_change_in_version){
    	add_action('admin_footer', 'plugin_welcome_message');
    }

    which works fine for manual installation/activation. However when using automatic upgrades, plugin_welcome_message gets called without “some htmml” output to the browser, which would make sense since the plugin is activated after the page has loaded, ie after admin_footer has been called. So I’ve tried:

    function plugin_welcome_message() {
    	echo "some html";
    }
    if (!did_action('admin_footer') AND  $plugin_detected_change_in_version){
    	add_action('admin_footer', 'plugin_welcome_message');
    }

    in an attempt to wait for the next pageload, but still plugin_welcome_message is at some point called without “some html” output to the browser. Now I’m stumped.

    Any help or suggestions anyone could offer would be greatly appreciated 😉

  • The topic ‘add_action to admin_footer after plugin update?’ is closed to new replies.