woocommerce_plugins_activate_error action-hookWC 6.4.0

Action triggered when a plugin activation fails.

Usage

add_action( 'woocommerce_plugins_activate_error', 'wp_kama_woocommerce_plugins_activate_error_action', 10, 2 );

/**
 * Function for `woocommerce_plugins_activate_error` action-hook.
 * 
 * @param string        $slug   The plugin slug.
 * @param null|WP_Error $result The result of the plugin activation.
 *
 * @return void
 */
function wp_kama_woocommerce_plugins_activate_error_action( $slug, $result ){

	// action...
}
$slug(string)
The plugin slug.
$result(null|WP_Error)
The result of the plugin activation.

Changelog

Since 6.4.0 Introduced.

Where the hook is called

PluginsHelper::activate_plugins()
woocommerce_plugins_activate_error
woocommerce/src/Admin/PluginsHelper.php 420
do_action( 'woocommerce_plugins_activate_error', $slug, $result );

Where the hook is used in WooCommerce

woocommerce/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php 41
add_action( 'woocommerce_plugins_activate_error', array( $this, 'on_install_error' ) );