woocommerce/plugins/woocommerce-admin/client/marketing
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
..
components Add `source` event props for `marketing_recommended_extension` track events to differentiate recommendations from woo.com API or default fallback data (#44714) 2024-02-20 19:44:28 +08:00
coupons Add `source` event props for `marketing_recommended_extension` track events to differentiate recommendations from woo.com API or default fallback data (#44714) 2024-02-20 19:44:28 +08:00
data fix: fixed all instances of no-use-before-define lint rule violations 2023-11-16 19:21:30 +08:00
data-multichannel Add formatting for Cost and Sales numbers in Campaigns card in Marketing page (#44917) 2024-03-19 01:56:08 +08:00
hooks Add formatting for Cost and Sales numbers in Campaigns card in Marketing page (#44917) 2024-03-19 01:56:08 +08:00
overview-multichannel Add `source` event props for `marketing_recommended_extension` track events to differentiate recommendations from woo.com API or default fallback data (#44714) 2024-02-20 19:44:28 +08:00
types Marketing: Add "Sales" column in Campaigns card (#43284) 2024-01-19 01:42:35 +08:00
utils Add `source` event props for `marketing_recommended_extension` track events to differentiate recommendations from woo.com API or default fallback data (#44714) 2024-02-20 19:44:28 +08:00
README.md

README.md

Marketing

This folder contains the components used in the Marketing page.