woocommerce_plugins_install_error
Action triggered when a plugin installation fails.
Usage
add_action( 'woocommerce_plugins_install_error', 'wp_kama_woocommerce_plugins_install_error_action', 10, 4 ); /** * Function for `woocommerce_plugins_install_error` action-hook. * * @param string $slug The plugin slug. * @param object $api The plugin API object. * @param WP_Error|null $result The result of the plugin installation. * @param Plugin_Upgrader $upgrader The plugin upgrader. * * @return void */ function wp_kama_woocommerce_plugins_install_error_action( $slug, $api, $result, $upgrader ){ // action... }
- $slug(string)
- The plugin slug.
- $api(object)
- The plugin API object.
- $result(WP_Error|null)
- The result of the plugin installation.
- $upgrader(Plugin_Upgrader)
- The plugin upgrader.
Changelog
Since 6.4.0 | Introduced. |
Where the hook is called
woocommerce_plugins_install_error
woocommerce/src/Admin/PluginsHelper.php 325
do_action( 'woocommerce_plugins_install_error', $slug, $api, $result, $upgrader );
Where the hook is used in WooCommerce
woocommerce/src/Admin/API/OnboardingPlugins.php 127
add_action( 'woocommerce_plugins_install_error', array( $this, 'log_plugins_install_error' ), 10, 4 );
woocommerce/src/Internal/Admin/Notes/InstallJPAndWCSPlugins.php 40
add_action( 'woocommerce_plugins_install_error', array( $this, 'on_install_error' ) );