diff --git a/projects/packages/my-jetpack/_inc/components/product-detail-table/index.jsx b/projects/packages/my-jetpack/_inc/components/product-detail-table/index.jsx index 79678395ed8b3..e29aa28e7f78e 100644 --- a/projects/packages/my-jetpack/_inc/components/product-detail-table/index.jsx +++ b/projects/packages/my-jetpack/_inc/components/product-detail-table/index.jsx @@ -74,9 +74,9 @@ const ProductDetailTableColumn = ( { }, [ trackProductButtonClick, onProductButtonClick, runCheckout, detail, tier ] ); // Compute the price per month. - const price = fullPrice ? Math.ceil( ( fullPrice / 12 ) * 100 ) / 100 : null; + const price = fullPrice ? Math.round( ( fullPrice / 12 ) * 100 ) / 100 : null; const offPrice = introductoryOffer?.costPerInterval - ? Math.ceil( ( introductoryOffer.costPerInterval / 12 ) * 100 ) / 100 + ? Math.round( ( introductoryOffer.costPerInterval / 12 ) * 100 ) / 100 : null; const isOneMonthOffer = diff --git a/projects/packages/my-jetpack/_inc/state/selectors.js b/projects/packages/my-jetpack/_inc/state/selectors.js index 0ada19c791ea8..c14f7798af034 100644 --- a/projects/packages/my-jetpack/_inc/state/selectors.js +++ b/projects/packages/my-jetpack/_inc/state/selectors.js @@ -38,12 +38,12 @@ export const getProduct = ( state, productId ) => { product.pricingForUi.fullPricePerMonth = product.pricingForUi.productTerm === 'year' - ? Math.ceil( ( product.pricingForUi.fullPrice / 12 ) * 100 ) / 100 + ? Math.round( ( product.pricingForUi.fullPrice / 12 ) * 100 ) / 100 : product.pricingForUi.fullPrice; product.pricingForUi.discountPricePerMonth = product.pricingForUi.productTerm === 'year' - ? Math.ceil( ( product.pricingForUi.discountPrice / 12 ) * 100 ) / 100 + ? Math.round( ( product.pricingForUi.discountPrice / 12 ) * 100 ) / 100 : product.pricingForUi.discountPrice; return product; diff --git a/projects/packages/my-jetpack/changelog/fix-price-calculation-issue-my-jetpack b/projects/packages/my-jetpack/changelog/fix-price-calculation-issue-my-jetpack new file mode 100644 index 0000000000000..9980a96707f6a --- /dev/null +++ b/projects/packages/my-jetpack/changelog/fix-price-calculation-issue-my-jetpack @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Fixes issue on My Jetpack interstitials where some prices are 1 cent off