woocommerce_plugins_activate_error
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
woocommerce_plugins_activate_error
woocommerce/src/Admin/PluginsHelper.php 466
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' ) );