Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social | Remove upgrade nudge for vip sites #41146

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Ensure that VIP sites don't see the upgrade nudge
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import { getRedirectUrl } from '@automattic/jetpack-components';
import {
getSiteFragment,
isAtomicSite,
isSimpleSite,
} from '@automattic/jetpack-shared-extension-utils';
import { AdminSiteData, getScriptData } from '@automattic/jetpack-script-data';
import { getSiteFragment } from '@automattic/jetpack-shared-extension-utils';
import { Button, PanelRow } from '@wordpress/components';
import { _x } from '@wordpress/i18n';
import { hasSocialPaidFeatures } from '../../utils';
import styles from './styles.module.scss';
import { useAutoSaveAndRedirect } from './use-auto-save-and-redirect';

const DISABLE_NUDGE_FOR: Array< AdminSiteData[ 'host' ] > = [ 'wpcom', 'atomic', 'woa', 'vip' ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we flip this logic and have it for just Jetpack sites (as long as that includes Social of course)?


export const EnhancedFeaturesNudge: React.FC = () => {
const autosaveAndRedirect = useAutoSaveAndRedirect();

const isWpcom = isSimpleSite() || isAtomicSite();

if ( isWpcom || hasSocialPaidFeatures() ) {
if ( hasSocialPaidFeatures() || DISABLE_NUDGE_FOR.includes( getScriptData().site.host ) ) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Social | Ensure that VIP sites don't see the upgrade nudge
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Ensure that VIP sites don't see the upgrade nudge
Loading