diff --git a/plugins/woocommerce-admin/src/Features/Onboarding.php b/plugins/woocommerce-admin/src/Features/Onboarding.php index 159c370178d..60af08843b9 100644 --- a/plugins/woocommerce-admin/src/Features/Onboarding.php +++ b/plugins/woocommerce-admin/src/Features/Onboarding.php @@ -383,6 +383,7 @@ class Onboarding { return apply_filters( 'woocommerce_onboarding_plugins_whitelist', array( + 'facebook-for-woocommerce' => 'facebook-for-woocommerce/facebook-for-woocommerce.php', 'jetpack' => 'jetpack/jetpack.php', 'woocommerce-services' => 'woocommerce-services/woocommerce-services.php', 'woocommerce-gateway-stripe' => 'woocommerce-gateway-stripe/woocommerce-gateway-stripe.php', diff --git a/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Facebook_Extension.php b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Facebook_Extension.php index 8acb5a13d7b..28562fadd52 100644 --- a/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Facebook_Extension.php +++ b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Facebook_Extension.php @@ -81,19 +81,22 @@ class WC_Admin_Notes_Facebook_Extension { /** * Install Facebook extension when note is actioned. + * + * @param WC_Admin_Note $note Note being acted upon. */ public function install_facebook_extension( $note ) { if ( self::NOTE_NAME === $note->get_name() ) { - $plugin = array( 'plugin' => 'facebook-for-woocommerce' ); - $installer = new \Automattic\WooCommerce\Admin\API\OnboardingPlugins(); - $result = $installer->install_plugin( $plugin ); + $install_request = array( 'plugin' => 'facebook-for-woocommerce' ); + $installer = new \Automattic\WooCommerce\Admin\API\OnboardingPlugins(); + $result = $installer->install_plugin( $install_request ); if ( is_wp_error( $result ) ) { // @todo Reset note actioned status? return; } - $installer->activate_plugin( $plugin ); + $activate_request = array( 'plugins' => 'facebook-for-woocommerce' ); + $installer->activate_plugins( $activate_request ); } } }