woocommerce/plugins/woocommerce-admin/client/marketing/data-multichannel
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
..
action-types.ts Simplify wp.data for receiveCampaignTypes. 2023-03-03 00:24:51 +08:00
actions.ts Simplify receiveCampaignTypes. 2023-03-03 00:54:21 +08:00
constants.ts Call marketing channels API with wp.data. 2023-01-18 02:04:42 +08:00
controls.ts Remove unused fetchWithHeaders control. 2023-02-24 23:35:40 +08:00
guards.ts Call marketing channels API with wp.data. 2023-01-18 02:04:42 +08:00
index.ts Add controls with fetchWithHeaders. 2023-02-24 02:08:59 +08:00
reducer.ts Make the `useCampaigns` hook support being used with multiple instances (#41211) 2023-12-05 11:20:05 +08:00
resolvers.ts fix: applied lint autofixes (#39942) 2023-08-30 06:40:45 +08:00
selectors.ts Make the `useCampaigns` hook support being used with multiple instances (#41211) 2023-12-05 11:20:05 +08:00
types.ts Add formatting for Cost and Sales numbers in Campaigns card in Marketing page (#44917) 2024-03-19 01:56:08 +08:00