Skip to main content
Skip to main content

FormatVariantPriceParams

Options to format a variant's price.

Properties

regionRegionInfoRequired
A region's details.
variantProductVariantInfoRequired
A variant's details.
includeTaxesboolean
Whether the computed price should include taxes or not.

Default: true

localestring
A BCP 47 language tag. The default value is en-US. This is passed as a first parameter to Intl.NumberFormat which is used within the utility method. You can learn more about this method’s parameters in MDN’s documentation.
maximumFractionDigitsnumber
The maximum number of fraction digits to use when formatting the price. This is passed as an option to Intl.NumberFormat which is used within the utility method. You can learn more about this method’s options in MDN’s documentation.
minimumFractionDigitsnumber
The minimum number of fraction digits to use when formatting the price. This is passed as an option to Intl.NumberFormat in the underlying layer. You can learn more about this method’s options in MDN’s documentation.
Was this section helpful?