return values from hooks do_action and apply_filters, which is better

Contrary to the comments… I’d say that you should use filter as in method 1 because…

  1. Message will depend on quite a few things right now, You just do a test if statement, later on message may depend on some other factors ( like maybe validating a nonce on failure giving message ‘None invalid’ ).
  2. Actions help in extending your code’s functionality… later on some other plugin ( or maybe theme, if your plugin get’s incredibly famous 😀 ) may wanna change the message to be more friendly like Sorry, couldn't update.

It’s always easier with filters, remember whenever you have a value involved ( like an output message, or value saved into db ) it’s best to use filters.