diff --git a/client/components/theme/index.jsx b/client/components/theme/index.jsx index ee41e61b30f76..71066f139d641 100644 --- a/client/components/theme/index.jsx +++ b/client/components/theme/index.jsx @@ -268,7 +268,19 @@ export class Theme extends Component { renderMoreButton = () => { const { active, buttonContents, index, theme } = this.props; - if ( isEmpty( buttonContents ) ) { + + let moreOptions = buttonContents; + if ( isEnabled( 'themes/tiers' ) ) { + if ( active && buttonContents.info ) { + moreOptions = { info: buttonContents.info }; + } else if ( buttonContents.deleteTheme ) { + moreOptions = { deleteTheme: buttonContents.deleteTheme }; + } else { + moreOptions = {}; + } + } + + if ( isEmpty( moreOptions ) ) { return null; } @@ -280,7 +292,7 @@ export class Theme extends Component { active={ active } onMoreButtonClick={ this.props.onMoreButtonClick } onMoreButtonItemClick={ this.props.onMoreButtonItemClick } - options={ buttonContents } + options={ moreOptions } /> ); }; diff --git a/client/my-sites/themes/theme-preview.jsx b/client/my-sites/themes/theme-preview.jsx index 034e16d832ab2..67f215b0dbca8 100644 --- a/client/my-sites/themes/theme-preview.jsx +++ b/client/my-sites/themes/theme-preview.jsx @@ -1,3 +1,4 @@ +import { isEnabled } from '@automattic/calypso-config'; import page from '@automattic/calypso-router'; import { Button } from '@automattic/components'; import { createHigherOrderComponent } from '@wordpress/compose'; @@ -250,12 +251,16 @@ class ThemePreview extends Component { externalUrl={ demoUrl } belowToolbar={ this.props.belowToolbar } > - { showActionIndicator && } - { ! showActionIndicator && this.renderSecondaryButton() } - { ! showActionIndicator && - ( this.shouldShowUnlockStyleButton() - ? this.renderUnlockStyleButton() - : this.renderPrimaryButton() ) } + { ! isEnabled( 'themes/tiers' ) && ( + <> + { showActionIndicator && } + { ! showActionIndicator && this.renderSecondaryButton() } + { ! showActionIndicator && + ( this.shouldShowUnlockStyleButton() + ? this.renderUnlockStyleButton() + : this.renderPrimaryButton() ) } + + ) } ) } { showUnlockStyleUpgradeModal && (