diff --git a/packages/js/src/integrations-page/helper.js b/packages/js/src/integrations-page/helper.js index 3c67476226a..4bd8d56e106 100644 --- a/packages/js/src/integrations-page/helper.js +++ b/packages/js/src/integrations-page/helper.js @@ -1,7 +1,5 @@ import apiFetch from "@wordpress/api-fetch"; -const isPremiumInstalled = Boolean( window.wpseoScriptData.isPremium ); - /** * Checks if an integration is active. * @@ -56,7 +54,7 @@ export const getIsMultisiteAvailable = ( integration ) => { * @returns {bool} True if the integration is available to the user. */ export const getIsFreeIntegrationOrPremiumAvailable = ( integration ) => { - return ( integration.isPremium && isPremiumInstalled ) || ! integration.isPremium; + return ( integration.isPremium && Boolean( window.wpseoScriptData.isPremium ) ) || ! integration.isPremium; }; /* eslint-disable complexity */ diff --git a/packages/js/tests/setupTests.js b/packages/js/tests/setupTests.js index cfe2585aa9d..c3eb5a5a55d 100644 --- a/packages/js/tests/setupTests.js +++ b/packages/js/tests/setupTests.js @@ -29,10 +29,6 @@ global.wpApiSettings = { root: "http://example.com", }; -global.wpseoScriptData = { - isPremium: 0, -}; - /* Mock the IntersectionObserver. */ global.IntersectionObserver = class { /**