Skip to content

Commit

Permalink
Update variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
jeyip committed Oct 15, 2024
1 parent b8f5194 commit 276f7af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/data-stores/src/add-ons/hooks/use-add-on-prices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ const useAddOnPrices = ( productSlug: ProductsList.StoreProductSlug, quantity?:
// taking a cursory look, it seems as if this will require deeper investigation. For now, because
// we are always working with smallest currency units for add-ons, we explicitly round decimal add-on
// monthly prices to suppress the warnings ( something that was already happening in the library ).
const rawMonthlyPrice = cost / 12;
let monthlyPrice = Number.isInteger( rawMonthlyPrice )
? rawMonthlyPrice
: Math.round( rawMonthlyPrice );
const initialMonthlyPrice = cost / 12;
let monthlyPrice = Number.isInteger( initialMonthlyPrice )
? initialMonthlyPrice
: Math.round( initialMonthlyPrice );
let yearlyPrice = cost;

if ( product?.term === 'month' ) {
Expand Down

0 comments on commit 276f7af

Please sign in to comment.