Automattic\WooCommerce\Internal\Admin\Notes

InstallJPAndWCSPlugins::on_install_error()publicWC 1.0

Create an alert notification in response to an error installing a plugin.

Method of the class: InstallJPAndWCSPlugins{}

No Hooks.

Return

null. Nothing (null).

Usage

$InstallJPAndWCSPlugins = new InstallJPAndWCSPlugins();
$InstallJPAndWCSPlugins->on_install_error( $slug );
$slug(string) (required)
The slug of the plugin being installed.

InstallJPAndWCSPlugins::on_install_error() code WC 8.7.0

public function on_install_error( $slug ) {
	// Exit early if we're not installing the Jetpack or the WooCommerce Shipping & Tax plugins.
	if ( 'jetpack' !== $slug && 'woocommerce-services' !== $slug ) {
		return;
	}

	self::possibly_add_note();
}