Is there a WordPress core & plugins update action hook?

Hooks

The hooks you’re searching for are

'pre_set_site_transient_update_plugins'

and

'upgrader_post_install'

The later takes three arguments. Example:

function upgrader_post_install_cb( $true, $hook_extra, $result )

and should be used for: Move & activate the plugin, echo the update message.

Moving plugins

Moving works like this:

$wp_filesystem->move( 
     $result['destination']
    ,'your_destination_path'
);

Then use activate_plugin( 'path/file' ); after moving.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)