Commit 286b4c096fa for woocommerce
commit 286b4c096fa6a867586a29aa0ff6d18279a4c22a
Author: Pavel Dohnal <pavel.dohnal@automattic.com>
Date: Mon May 4 13:44:59 2026 +0200
Remove Facebook from OBW plugin rotation (#64562)
* Remove Facebook from OBW plugin rotation
* Add changelog for OBW plugin rotation update
* Remove stale Facebook core profiler metadata
diff --git a/plugins/woocommerce/changelog/tweak-remove-facebook-obw-plugin-rotation b/plugins/woocommerce/changelog/tweak-remove-facebook-obw-plugin-rotation
new file mode 100644
index 00000000000..6481e4c4b00
--- /dev/null
+++ b/plugins/woocommerce/changelog/tweak-remove-facebook-obw-plugin-rotation
@@ -0,0 +1,4 @@
+Significance: patch
+Type: tweak
+
+Remove Facebook for WooCommerce from the onboarding wizard plugin rotation.
diff --git a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php
index 791cd5a7767..220781be462 100644
--- a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php
+++ b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php
@@ -91,7 +91,6 @@ class DefaultFreeExtensions {
self::get_plugin( 'woocommerce-services:tax' ),
self::get_plugin( 'tiktok-for-business' ),
self::get_plugin( 'snapchat-for-woocommerce' ),
- self::get_plugin( 'facebook-for-woocommerce' ),
self::get_plugin( 'reddit-for-woocommerce' ),
)
),
@@ -595,13 +594,6 @@ class DefaultFreeExtensions {
'learn_more_link' => 'https://woocommerce.com/products/snapchat/?utm_source=storeprofiler&utm_medium=product&utm_campaign=freefeatures',
'install_priority' => 1,
),
- 'facebook-for-woocommerce' => array(
- 'label' => __( 'Grow your business with Facebook and Instagram', 'woocommerce' ),
- 'image_url' => plugins_url( '/assets/images/core-profiler/logo-facebook.svg', WC_PLUGIN_FILE ),
- 'description' => __( 'List products and create ads on Facebook and Instagram.', 'woocommerce' ),
- 'learn_more_link' => 'https://woocommerce.com/products/facebook/?utm_source=storeprofiler&utm_medium=product&utm_campaign=freefeatures',
- 'install_priority' => 2,
- ),
'reddit-for-woocommerce' => array(
'label' => __( 'Find New Customers with Reddit Ads', 'woocommerce' ),
'image_url' => plugins_url( '/assets/images/core-profiler/logo-reddit.svg', WC_PLUGIN_FILE ),
@@ -644,12 +636,12 @@ class DefaultFreeExtensions {
self::get_rules_for_wcservices_tax_countries(),
);
- // TikTok, Pinterest, and Facebook share a single spot with 1/3 rotation each.
+ // TikTok and Pinterest share a single spot with 1/2 rotation each.
$_plugins['tiktok-for-business']['is_visible'] = array(
array(
'type' => 'option',
'option_name' => 'woocommerce_remote_variant_assignment',
- 'value' => array( 1, 40 ),
+ 'value' => array( 1, 60 ),
'default' => false,
'operation' => 'range',
),
@@ -659,17 +651,7 @@ class DefaultFreeExtensions {
array(
'type' => 'option',
'option_name' => 'woocommerce_remote_variant_assignment',
- 'value' => array( 41, 80 ),
- 'default' => false,
- 'operation' => 'range',
- ),
- );
-
- $_plugins['facebook-for-woocommerce']['is_visible'] = array(
- array(
- 'type' => 'option',
- 'option_name' => 'woocommerce_remote_variant_assignment',
- 'value' => array( 81, 120 ),
+ 'value' => array( 61, 120 ),
'default' => false,
'operation' => 'range',
),
diff --git a/plugins/woocommerce/tests/php/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensionsTest.php b/plugins/woocommerce/tests/php/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensionsTest.php
index 1f05b1d082c..bc42af76103 100644
--- a/plugins/woocommerce/tests/php/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensionsTest.php
+++ b/plugins/woocommerce/tests/php/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensionsTest.php
@@ -1,4 +1,5 @@
<?php
+declare( strict_types = 1 );
namespace Automattic\WooCommerce\Tests\Internal\Admin\RemoteFreeExtensions;
@@ -123,6 +124,43 @@ class DefaultFreeExtensionsTest extends WC_Unit_Test_Case {
self::delete_folders( dirname( $shipping_plugin_file_path ) );
}
+ /**
+ * @testdox Core profiler defaults should exclude Facebook from the growth plugin rotation.
+ */
+ public function test_core_profiler_excludes_facebook_from_growth_plugin_rotation(): void {
+ $plugin_slugs = array_map(
+ function ( $plugin ) {
+ return $plugin->key;
+ },
+ $this->get_core_profiler_plugins()
+ );
+
+ $this->assertNotContains(
+ 'facebook-for-woocommerce',
+ $plugin_slugs,
+ 'Facebook should not be included in the core profiler defaults.'
+ );
+ }
+
+ /**
+ * @testdox Core profiler defaults should split the growth plugin rotation between TikTok and Pinterest.
+ */
+ public function test_core_profiler_splits_growth_plugin_rotation_between_tiktok_and_pinterest(): void {
+ $tiktok = $this->get_core_profiler_plugin_by_slug( 'tiktok-for-business' );
+ $pinterest = $this->get_core_profiler_plugin_by_slug( 'pinterest-for-woocommerce' );
+
+ $this->assertSame(
+ array( 1, 60 ),
+ $tiktok->is_visible[0]->value,
+ 'TikTok should cover the first half of the shared rotation.'
+ );
+ $this->assertSame(
+ array( 61, 120 ),
+ $pinterest->is_visible[0]->value,
+ 'Pinterest should cover the second half of the shared rotation.'
+ );
+ }
+
/**
* Evaluates bundles passed as argument and extracts keys of recommended plugins.
*
@@ -147,4 +185,35 @@ class DefaultFreeExtensionsTest extends WC_Unit_Test_Case {
$results['bundles'][0]['plugins']
);
}
+
+ /**
+ * Gets default core profiler plugin specs.
+ *
+ * @return array
+ */
+ private function get_core_profiler_plugins(): array {
+ foreach ( DefaultFreeExtensions::get_all() as $bundle ) {
+ if ( 'obw/core-profiler' === $bundle->key ) {
+ return $bundle->plugins;
+ }
+ }
+
+ $this->fail( 'Core profiler bundle was not found.' );
+ }
+
+ /**
+ * Gets a default core profiler plugin by slug.
+ *
+ * @param string $slug Plugin slug.
+ * @return object
+ */
+ private function get_core_profiler_plugin_by_slug( string $slug ): object {
+ foreach ( $this->get_core_profiler_plugins() as $plugin ) {
+ if ( $slug === $plugin->key ) {
+ return $plugin;
+ }
+ }
+
+ $this->fail( "Plugin {$slug} was not found." );
+ }
}