Commit 0c050166027 for woocommerce
commit 0c05016602765bda17328e3d10a4854f88ed9db3
Author: Yuliyan Slavchev <yuliyan.slavchev@gmail.com>
Date: Tue Oct 20 10:57:51 2026 +0300
Show marketing channels to site admins on multisite (#69993)
* Show marketing channels to site admins on multisite
* Add changelog entry
diff --git a/plugins/woocommerce/changelog/55130-marketing-channels-multisite-site-admin b/plugins/woocommerce/changelog/55130-marketing-channels-multisite-site-admin
new file mode 100644
index 00000000000..314121056f8
--- /dev/null
+++ b/plugins/woocommerce/changelog/55130-marketing-channels-multisite-site-admin
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Show registered marketing channels to site admins on multisite instead of hiding the Channels card.
diff --git a/plugins/woocommerce/client/admin/client/marketing/hooks/useRecommendedChannels.ts b/plugins/woocommerce/client/admin/client/marketing/hooks/useRecommendedChannels.ts
index 9e2efe4df7b..8c0eda8aacd 100644
--- a/plugins/woocommerce/client/admin/client/marketing/hooks/useRecommendedChannels.ts
+++ b/plugins/woocommerce/client/admin/client/marketing/hooks/useRecommendedChannels.ts
@@ -10,14 +10,23 @@ import { differenceWith } from 'lodash';
*/
import { STORE_KEY } from '~/marketing/data-multichannel/constants';
import type { RecommendedChannel } from '~/marketing/data-multichannel/types';
+import { getAdminSetting } from '~/utils/admin-settings';
type UseRecommendedChannels = {
loading: boolean;
data?: Array< RecommendedChannel >;
};
+// Comes from PHP because the REST user capabilities report install_plugins
+// for site admins on multisite, even though they can't install plugins.
+const { canInstallPlugins = true } = getAdminSetting( 'marketing', {} );
+
export const useRecommendedChannels = (): UseRecommendedChannels => {
return useSelect( ( select ) => {
+ if ( ! canInstallPlugins ) {
+ return { loading: false, data: [] };
+ }
+
const { hasFinishedResolution, getRecommendedChannels } =
select( STORE_KEY );
const { data, error } = getRecommendedChannels() as {
diff --git a/plugins/woocommerce/src/Internal/Admin/Marketing.php b/plugins/woocommerce/src/Internal/Admin/Marketing.php
index b3eff6d302a..450ef891423 100644
--- a/plugins/woocommerce/src/Internal/Admin/Marketing.php
+++ b/plugins/woocommerce/src/Internal/Admin/Marketing.php
@@ -233,6 +233,7 @@ class Marketing {
}
$settings['marketing']['installedExtensions'] = InstalledExtensions::get_data();
+ $settings['marketing']['canInstallPlugins'] = current_user_can( 'install_plugins' );
return $settings;
}