Home/Hooks/activated_plugin
ACTION

activated_plugin

Fires after a plugin has been activated. If a plugin is silently activated (such as during an update), this hook does not fire. or just the current site. Multisite only. Default false.

wp-admin/includes/plugin.php
Line 730
2 Parameters
View Source

Usage

add_action( 'activated_plugin', 'your_callback_function', 10, 2 );

Action Callback:

function your_callback_function( $plugin, $network_wide ) {
    // Your code here
    
}

Parameters

$plugin

Parameter 1

$network_wide

Parameter 2

⚡ Action Hook

Action hooks allow you to insert custom code at specific points during WordPress execution. Actions do not return any values.