- { { leyend } }
+ { children ? children : { leyend } }
>
);
};
diff --git a/projects/js-packages/components/components/product-price/style.module.scss b/projects/js-packages/components/components/product-price/style.module.scss
index 99d0b916946f..58206ec21490 100644
--- a/projects/js-packages/components/components/product-price/style.module.scss
+++ b/projects/js-packages/components/components/product-price/style.module.scss
@@ -34,6 +34,8 @@
.leyend {
color: var( --jp-gray-40 );
margin-bottom: calc( var( --spacing-base ) * 3 );
+ font-size: var(--font-body-small);
+ line-height: 20px;
&::after {
content: "\200B"; // Pseudo element to keep height
diff --git a/projects/js-packages/components/components/product-price/types.ts b/projects/js-packages/components/components/product-price/types.ts
index cdce5c132854..fad337a98b26 100644
--- a/projects/js-packages/components/components/product-price/types.ts
+++ b/projects/js-packages/components/components/product-price/types.ts
@@ -38,6 +38,11 @@ export type ProductPriceProps = {
* Promo label to show top right of the price.
*/
promoLabel?: string;
+
+ /**
+ * Alternative leyend with HTML syntax
+ */
+ children?: React.ReactNode;
};
export type PriceProps = {
diff --git a/projects/packages/search/changelog/update-upsell_page b/projects/packages/search/changelog/update-upsell_page
new file mode 100644
index 000000000000..e6eede92f0de
--- /dev/null
+++ b/projects/packages/search/changelog/update-upsell_page
@@ -0,0 +1,4 @@
+Significance: major
+Type: changed
+
+Introduce PricingTable to update Upsell page
diff --git a/projects/packages/search/src/dashboard/components/pages/upsell-page.jsx b/projects/packages/search/src/dashboard/components/pages/upsell-page.jsx
index ebc56171d4c5..46c900e52c90 100644
--- a/projects/packages/search/src/dashboard/components/pages/upsell-page.jsx
+++ b/projects/packages/search/src/dashboard/components/pages/upsell-page.jsx
@@ -4,6 +4,14 @@ import {
Col,
PricingCard,
AdminSectionHero,
+ ProductPrice,
+ PricingTable,
+ PricingTableColumn,
+ PricingTableHeader,
+ PricingTableItem,
+ IconTooltip,
+ Button,
+ ThemeProvider,
} from '@automattic/jetpack-components';
import { useSelect } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
@@ -37,9 +45,8 @@ export default function UpsellPage( { isLoading = false } ) {
[ isLoading ]
);
- const priceBefore = useSelect( select => select( STORE_ID ).getPriceBefore() / 12, [] );
- const priceAfter = useSelect( select => select( STORE_ID ).getPriceAfter() / 12, [] );
- const priceCurrencyCode = useSelect( select => select( STORE_ID ).getPriceCurrencyCode(), [] );
+ // Introduce the gate for new pricing with URL parameter `new_pricing_202208=1`
+ const isNewPricing = useSelect( select => select( STORE_ID ).isNewPricing202208(), [] );
const domain = useSelect( select => select( STORE_ID ).getCalypsoSlug(), [] );
const adminUrl = useSelect( select => select( STORE_ID ).getSiteAdminUrl(), [] );
@@ -51,12 +58,217 @@ export default function UpsellPage( { isLoading = false } ) {
} );
}, [ domain, adminUrl, isFullyConnected ] );
+ // For old pricing card
+ const priceBefore = useSelect( select => select( STORE_ID ).getPriceBefore() / 12, [] );
+ const priceAfter = useSelect( select => select( STORE_ID ).getPriceAfter() / 12, [] );
+ const priceCurrencyCode = useSelect( select => select( STORE_ID ).getPriceCurrencyCode(), [] );
const basicInfoText = __( '14 day money back guarantee.', 'jetpack-search-pkg' );
const onSaleInfoText = __(
'Special introductory pricing, all renewals are at full price. 14 day money back guarantee.',
'jetpack-search-pkg'
);
+ // For new pricing table
+ const siteDomain = useSelect( select => select( STORE_ID ).getCalypsoSlug(), [] );
+ const newPricingArgs = {
+ title: 'The best WordPress search experience',
+ items: [
+ {
+ name: 'Number of records',
+ tooltipInfo: (
+ <>
+ Records are all posts, pages, custom post types and other types of content indexed by
+ Jetpack Search.
+ >
+ ),
+ },
+ {
+ name: 'Monthly requests',
+ tooltipInfo: (
+ <>A search request is when someone visiting your site searches for something.>
+ ),
+ },
+ {
+ name: 'Unbranded search',
+ tooltipInfo: <>Paid customers can remove branding from the search tool.>,
+ },
+ {
+ name: 'Priority support',
+ tooltipInfo: (
+ <>
+ Paid customers get dedicated email support from our world-class Happiness Engineers to
+ help with any issue.
+
+
+ All other questions are handled by our team as quickly as we are able to through the
+ WordPress support forum.
+ >
+ ),
+ },
+ {
+ name: 'Instant search and indexing',
+ tooltipInfo: (
+ <>
+ Instant search and filtering without reloading the page.
+
+
+ Real-time indexing, so your search index will update within minutes of changes to your
+ site.
+ >
+ ),
+ },
+ {
+ name: 'Powerful filtering',
+ tooltipInfo: (
+ <>
+ Filtered and faceted searches by tags, categories, dates, custom taxonomies, and post
+ types.
+ >
+ ),
+ },
+ {
+ name: 'Supports 38 languages',
+ tooltipInfo: (
+ <>
+ Language support for English, Spanish, French, Portuguese, Hindi, Japanese, among
+ others.{ ' ' }
+
+ See all supported languanges
+
+ >
+ ),
+ },
+ {
+ name: 'Spelling correction',
+ tooltipInfo: (
+ <>
+ Quick and accurate spelling correction for when your site visitors mistype their search.
+ >
+ ),
+ },
+ ],
+ };
+
+ const oldPricingComponent = (
+
+
+
{ __( 'The best WordPress search experience', 'jetpack-search-pkg' ) }
+
+
+
+
+
+
+
+ );
+
+ const newPricingComponent = (
+
+
+
+
+
+
+
+
+ Starting price per month, billed yearly
+
+ <>
+ Starting price based on the number of records for { siteDomain }. For
+ every additional 10k records or requests, an additional $7.50 per month will
+ be charged.
+ >
+
+
+
+
+
+ 10k records } />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ In the free plan, you can continue using the plugin even if you have more than
+ 5k records for three months.{ ' ' }
+
+ More about indexing and query limits
+
+ >
+ }
+ />
+
+ In the free plan, you can continue using the plugin even if you have more than
+ 500 requests for three consecutive months.{ ' ' }
+
+ More about indexing and query limits
+
+ >
+ }
+ />
+
+
+
+
+
+
+
+
+
+
+
+ );
+
return (
<>
{ isPageLoading && }
@@ -67,26 +279,7 @@ export default function UpsellPage( { isLoading = false } ) {
a8cLogoHref={ AUTOMATTIC_WEBSITE }
>
-
-
-
{ __( 'The best WordPress search experience', 'jetpack-search-pkg' ) }