woocommerce/plugins/woocommerce-admin/client/marketing/hooks
Gan Eng Chin 718fe762fa
Add formatting for Cost and Sales numbers in Campaigns card in Marketing page (#44917)
* Return formatted cost and sales price for MarketingCampaigns.

* Display formatted cost and sales number in Campaigns card.

* Use price formatting.

* Format decimal places based on currency.

* Add changelog.

* Fix type issue is useCampaigns.test.ts.

* Use wp_strip_all_tags to respect currency symbol positioning settings.

Without wp_strip_all_tags, the result contains <bdi> element, and it causes browser to show the currency symbol in unexpected unwanted position.

* Fix PHP linting issue.

* Fix tests in useCampaigns.test.ts.

* Use html_entity_decode to remove dangerouslySetInnerHTML usage.

* Remove unneeded code formatting in Campaigns.tsx.

* Add explanation comment for `get_formatted_price`.

* Fix PHP lint error.

* Use map instead of filter to get price format.

* Add code comment.

* Get currency info based on user locale or default locale.

* Use locales in locale-info.php instead of currency-info.php.

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>

* Code formatting and fix code comment.

* Fix lint errors.

---------

Co-authored-by: Bartosz Budzanowski <bartosz.budzanowski@automattic.com>
2024-03-19 01:56:08 +08:00
..
test Add formatting for Cost and Sales numbers in Campaigns card in Marketing page (#44917) 2024-03-19 01:56:08 +08:00
index.ts Fix hook file name with correct casing. 2023-03-22 16:51:25 +08:00
useCampaignTypes.ts Specify empty array dependency in useCampaignTypes. 2023-03-11 00:42:09 +08:00
useCampaigns.ts Add formatting for Cost and Sales numbers in Campaigns card in Marketing page (#44917) 2024-03-19 01:56:08 +08:00
useInstalledPluginsWithoutChannels.ts Fix hook file name with correct casing. 2023-03-22 16:51:25 +08:00
useIntroductionBanner.ts Fix useSelect dependency in useIntroductionBanner. 2023-03-19 20:50:37 +08:00
useRecommendedChannels.ts Specify empty array as hasFinishedResolution args. 2023-03-14 03:35:20 +08:00
useRegisteredChannels.ts Specify empty array as invalidateResolution and hasFinishedResolution args. 2023-03-14 03:32:54 +08:00