Having a lot of issues displaying prices in store currency in extensions using React. wc.priceFormat() can sometimes be accessed via in the window object, but only if one of woo's blocks is loaded... which enqueues wc-price-format
import { formatPrice } from '@woocommerce/price-format';
Doesn't actually import anything since @woocommerce/price-format doesn't exist in the dependency injector
cc @opr
Describe alternatives you've considered
I can also manually include wc-price-format as a dependency, but this will be easier and a nice stopgap until you have a universal store currency formatted component.
Describe the solution you'd like
Having a lot of issues displaying prices in store currency in extensions using React.
wc.priceFormat()
can sometimes be accessed via in the window object, but only if one of woo's blocks is loaded... which enqueueswc-price-format
Doesn't actually import anything since
@woocommerce/price-format
doesn't exist in the dependency injectorcc @opr
Describe alternatives you've considered
I can also manually include
wc-price-format
as a dependency, but this will be easier and a nice stopgap until you have a universal store currency formatted component.Additional context
https://woocommercecommunity.slack.com/archives/C03MCL9RTAR/p1709909491893599?thread_ts=1709835628.552119&cid=C03MCL9RTAR