1- import {
2- FEATURE_INSTALL_THEMES ,
3- WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED ,
4- } from '@automattic/calypso-products' ;
1+ import { FEATURE_INSTALL_THEMES } from '@automattic/calypso-products' ;
52import pageRouter from '@automattic/calypso-router' ;
63import { compact } from 'lodash' ;
74import PropTypes from 'prop-types' ;
@@ -13,7 +10,6 @@ import ThemesList from 'calypso/components/themes-list';
1310import { getThemeShowcaseEventRecorder } from 'calypso/my-sites/themes/events/theme-showcase-tracks' ;
1411import { recordGoogleEvent , recordTracksEvent } from 'calypso/state/analytics/actions' ;
1512import { isUserLoggedIn } from 'calypso/state/current-user/selectors' ;
16- import isSiteAutomatedTransfer from 'calypso/state/selectors/is-site-automated-transfer' ;
1713import siteHasFeature from 'calypso/state/selectors/site-has-feature' ;
1814import { getSiteSlug } from 'calypso/state/sites/selectors' ;
1915import { setThemePreviewOptions } from 'calypso/state/themes/actions' ;
@@ -325,14 +321,8 @@ export const ConnectedThemesSelection = connect(
325321 state ,
326322 { filter, page, search, tier, vertical, siteId, source, forceWpOrgSearch, tabFilter }
327323 ) => {
328- const isAtomic = isSiteAutomatedTransfer ( state , siteId ) ;
329324 const premiumThemesEnabled = arePremiumThemesEnabled ( state , siteId ) ;
330325 const hiddenFilters = getThemeHiddenFilters ( state , siteId , tabFilter ) ;
331- const hasUnlimitedPremiumThemes = siteHasFeature (
332- state ,
333- siteId ,
334- WPCOM_FEATURES_PREMIUM_THEMES_UNLIMITED
335- ) ;
336326 const canInstallThemes = siteHasFeature ( state , siteId , FEATURE_INSTALL_THEMES ) ;
337327
338328 let sourceSiteId ;
@@ -342,10 +332,6 @@ export const ConnectedThemesSelection = connect(
342332 sourceSiteId = siteId ? siteId : 'wpcom' ;
343333 }
344334
345- if ( isAtomic && ! hasUnlimitedPremiumThemes ) {
346- sourceSiteId = 'wpcom' ;
347- }
348-
349335 // number calculation is just a hack for Jetpack sites. Jetpack themes endpoint does not paginate the
350336 // results and sends all of the themes at once. QueryManager is not expecting such behaviour
351337 // and we ended up loosing all of the themes above number 20. Real solution will be pagination on
0 commit comments