How to show custom message once on plugin activation?

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

Leave a Comment