From 1b2261707287d557e7e5fbb64dee4c835f6a88dc Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Mon, 16 Dec 2024 14:34:00 -0500 Subject: [PATCH] Prevent fetching FPM settings on Ads settings view if feature not enabled. --- assets/js/modules/ads/components/settings/SettingsView.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/js/modules/ads/components/settings/SettingsView.js b/assets/js/modules/ads/components/settings/SettingsView.js index a9b878c9a82..b8880fb0cc0 100644 --- a/assets/js/modules/ads/components/settings/SettingsView.js +++ b/assets/js/modules/ads/components/settings/SettingsView.js @@ -68,6 +68,9 @@ export default function SettingsView() { ); const isFPMEnabled = useSelect( ( select ) => { + if ( ! fpmEnabled ) { + return false; + } const { isFirstPartyModeEnabled, isFPMHealthy, isScriptAccessEnabled } = select( CORE_SITE );