to action the note. if ( is_wp_error( $result ) ) { return; } $activate_request = array( 'plugins' => $plugin ); $installer->activate_plugins( $activate_request ); } /** * Create an alert notification in response to an error installing a plugin. * * @param string $slug The slug of the plugin being installed. */ 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(); } }