Skip to content

Commit

Permalink
Prevent fetching FPM settings on Ads settings view if feature not ena…
Browse files Browse the repository at this point in the history
…bled.
  • Loading branch information
aaemnnosttv committed Dec 16, 2024
1 parent fb1ee0b commit 1b22617
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/js/modules/ads/components/settings/SettingsView.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export default function SettingsView() {
);

const isFPMEnabled = useSelect( ( select ) => {
if ( ! fpmEnabled ) {
return false;
}
const { isFirstPartyModeEnabled, isFPMHealthy, isScriptAccessEnabled } =
select( CORE_SITE );

Expand Down

0 comments on commit 1b22617

Please sign in to comment.