How to show custom message once on plugin activation?

I know by watching the akismet plugin source how to show a custom message on the plugins page, but I want my message to appear only once after my plugin is activated.

How could i do this?

Related posts

Leave a Reply

1 comment

  1. The easiest way would be to check for an stub get_option something like

    $run_once = get_option('run_once');
    
    if (!$run_once){
        //show your custom message here
        // then update the option so this message won't show again
        update_option('run_once',true);
    }
    

    hope this helps