diff --git a/projects/js-packages/ai-client/changelog/change-jetpack-ai-logo-generator-upgrade-message b/projects/js-packages/ai-client/changelog/change-jetpack-ai-logo-generator-upgrade-message new file mode 100644 index 0000000000000..ae2b7edeaf3c7 --- /dev/null +++ b/projects/js-packages/ai-client/changelog/change-jetpack-ai-logo-generator-upgrade-message @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +AI Client: change upgrade copy edit and redirect URL diff --git a/projects/js-packages/ai-client/src/logo-generator/components/upgrade-screen.tsx b/projects/js-packages/ai-client/src/logo-generator/components/upgrade-screen.tsx index 796774de21072..5c401d17b7369 100644 --- a/projects/js-packages/ai-client/src/logo-generator/components/upgrade-screen.tsx +++ b/projects/js-packages/ai-client/src/logo-generator/components/upgrade-screen.tsx @@ -7,6 +7,7 @@ import { __ } from '@wordpress/i18n'; /** * Internal dependencies */ +import getRedirectUrl from '../../../../components/tools/jp-redirect/index.js'; import { EVENT_PLACEMENT_FREE_USER_SCREEN, EVENT_UPGRADE } from '../constants.js'; import useLogoGenerator from '../hooks/use-logo-generator.js'; /** @@ -21,8 +22,9 @@ export const UpgradeScreen: React.FC< { } > = ( { onCancel, upgradeURL, reason } ) => { const { tracks } = useAnalytics(); const { recordEvent: recordTracksEvent } = tracks; + const upgradeMessageFeature = __( - 'The logo generator requires a paid Jetpack AI plan. Upgrade your plan to access exclusive features, including logo generation. The upgrade will also increase the amount of requests you can use in all AI-powered features.', + 'Upgrade your Jetpack AI for access to logo generation. This upgrade will also increase the amount of monthly requests you can use in for all AI-powered features.', 'jetpack-ai-client' ); @@ -31,6 +33,10 @@ export const UpgradeScreen: React.FC< { 'jetpack-ai-client' ); + const upgradeInfoUrl = getRedirectUrl( 'ai-logo-generator-fair-usage-policy', { + anchor: 'usage-limitations-and-upgrades', + } ); + const { context } = useLogoGenerator(); const handleUpgradeClick = () => { @@ -45,7 +51,7 @@ export const UpgradeScreen: React.FC< { { reason === 'feature' ? upgradeMessageFeature : upgradeMessageRequests }   - diff --git a/projects/js-packages/ai-client/src/logo-generator/hooks/use-fair-usage-notice-message.tsx b/projects/js-packages/ai-client/src/logo-generator/hooks/use-fair-usage-notice-message.tsx index fc4ef8163b5eb..764d34403f4b7 100644 --- a/projects/js-packages/ai-client/src/logo-generator/hooks/use-fair-usage-notice-message.tsx +++ b/projects/js-packages/ai-client/src/logo-generator/hooks/use-fair-usage-notice-message.tsx @@ -1,6 +1,7 @@ import { useSelect } from '@wordpress/data'; import { createInterpolateElement } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; +import getRedirectUrl from '../../../../components/tools/jp-redirect/index.js'; /** * Internal dependencies */ @@ -52,14 +53,12 @@ const useFairUsageNoticeMessage = () => { // Get the proper template based on the presence of the next usage period start date. const fairUsageNoticeMessage = getFairUsageNoticeMessage( nextUsagePeriodStartDateString ); + const upgradeInfoUrl = getRedirectUrl( 'ai-logo-generator-fair-usage-policy', { + anchor: 'jetpack-ai-usage-limit', + } ); + const fairUsageNoticeMessageElement = createInterpolateElement( fairUsageNoticeMessage, { - link: ( - - ), + link: , } ); return fairUsageNoticeMessageElement; diff --git a/projects/js-packages/components/changelog/change-jetpack-ai-logo-generator-upgrade-message b/projects/js-packages/components/changelog/change-jetpack-ai-logo-generator-upgrade-message new file mode 100644 index 0000000000000..973eaab140c09 --- /dev/null +++ b/projects/js-packages/components/changelog/change-jetpack-ai-logo-generator-upgrade-message @@ -0,0 +1,4 @@ +Significance: patch +Type: changed + +Components - getRedirectUrl: use file extension on import for linter to find definitions diff --git a/projects/js-packages/components/tools/jp-redirect/index.ts b/projects/js-packages/components/tools/jp-redirect/index.ts index 0058c14d218b2..d46fd4e901378 100644 --- a/projects/js-packages/components/tools/jp-redirect/index.ts +++ b/projects/js-packages/components/tools/jp-redirect/index.ts @@ -1,6 +1,6 @@ /* global jetpack_redirects */ -import { GetRedirectUrlArgs, QueryVars } from './types'; +import { GetRedirectUrlArgs, QueryVars } from './types.js'; /** * Builds an URL using the jetpack.com/redirect/ service