Gan Eng Chin
6246cf6ff2
Marketing: Add "Sales" column in Campaigns card ( #43284 )
...
* Add sales property to MarketingCampaign class.
* Return campaign sales data in API.
* Display Sales in Campaigns card.
* Fix test for useCampaigns.
* Display a "-" when there are no cost or sales value in Campaigns card.
* Add changelog.
* Fix test for useCampaigns hook.
* Fix PHP lint issue.
2024-01-19 01:42:35 +08:00
Eason
d57b9e1d05
Make the `useCampaigns` hook support being used with multiple instances ( #41211 )
...
* Add tests for the `useCampaigns` hook in the woocommerce-admin marketing.
* Add `channels` to the deps of `useSelect` in the `useCampaigns` hook to avoid outdated hook states.
* Make the `useCampaigns` hook support being used with multiple instances.
- Include the `perPage` in the page key of campaigns in the multichannel's data store.
- Move the processing of querying the campaigns paging to the selector of the multichannel's data store.
- Move `total` in each campaign's paging of the multichannel's data store.
- Remove unused properties and their types: `state.campaigns.perPage` and `state.campaigns.total`
* Add changelog
* Multichannel data store - Move the `total` from `campaigns.pages[*]` to `campaigns.meta` to have only one total value.
Related to:
- https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1409634640
- https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1409590559
* Multichannel data store - Return the pagination meta of campaigns along with the `getCampaigns` selector.
Address: https://github.com/woocommerce/woocommerce/pull/41211#discussion_r1412266127
2023-12-05 11:20:05 +08:00
Gan Eng Chin
6fb787e954
Remove Codisto from default free extensions. ( #41499 )
2023-11-20 14:26:05 +08:00
rjchow
5d99b267bf
fix: fixed all instances of no-use-before-define lint rule violations
2023-11-16 19:21:30 +08:00
Gan Eng Chin
9118823382
Remove Codisto from test.
2023-11-16 16:22:33 +08:00
Eason
efd2ae7e0a
Fix the slides overlapping on the Marketing > Coupon page ( #41155 )
...
* Fix the slides overlapping on the Marketing > Coupon page.
* Add changelog
2023-11-14 10:23:08 +08:00
Leif Singer
808a0fc54f
update references to woocommerce.com to now reference woo.com
2023-11-10 15:49:08 +01:00
Gan Eng Chin
eac4258baa
Allow null in multichannel campaign. ( #41180 )
2023-11-03 21:17:16 +08:00
Gan Eng Chin
cb135df890
Null check on campaign.cost.
2023-11-02 22:19:03 +08:00
Gan Eng Chin
86b6a381a3
Add type for campaign cost.
...
Campaign cost can be null. See 408d6b7aee/plugins/woocommerce/src/Admin/Marketing/MarketingCampaign.php (L58)
.
2023-11-02 22:16:41 +08:00
Gan Eng Chin
b12f0e0aa8
Use Link component and set type based on manageUrl.
2023-11-02 21:38:43 +08:00
Gan Eng Chin
2cf12563c7
Use normal anchor link instead of WooCommerce Link component.
...
Apparently Link with type wp-admin is the same as normal anchor link anyway, there is no special code handling for wp-admin. So we might as well just use the normal link, and remove the dependency on Link.
2023-11-02 17:48:00 +08:00
Gan Eng Chin
3e65d941d1
Change link type to wp-admin in marketing campaign listing.
...
This is because not all `manageUrl` pages are wc-admin pages, e.g. MailPoet.
2023-11-02 17:34:46 +08:00
Bartosz Budzanowski
6e0e224196
Allow null in multichannel campaign.
2023-11-02 09:28:39 +01:00
RJ
0190f4adea
fix: applied lint autofixes ( #39942 )
...
* woocommerce-admin lint fixes
* @woocommerce/* lint fixes
* Add changefile(s) from automation for the following project(s): @woocommerce/date, @woocommerce/data, @woocommerce/components, @woocommerce/admin-layout, woocommerce
* lints
---------
Co-authored-by: github-actions <github-actions@github.com>
2023-08-30 06:40:45 +08:00
Gan Eng Chin
33f77af602
Fix TikTok naming in img alt attribute.
2023-08-15 14:11:35 +08:00
Gan Eng Chin
990af1f534
Rename "Install plugin" button text to "Install extension".
2023-07-06 23:50:56 +08:00
Gan Eng Chin
9d473adeb7
Make Klaviyo icon shows up in installed extensions card.
2023-06-27 23:36:44 +08:00
Gan Eng Chin
04294c4ec8
Simplify code to display buttons in IntroductionBanner.
2023-06-21 18:53:45 +08:00
Gan Eng Chin
617b51c91d
Add and fix tests for Campaigns component.
2023-06-20 23:03:56 +08:00
Gan Eng Chin
c6a5e8ba41
Do not show "Add channels" button when create campaign button is not shown.
2023-06-20 22:13:24 +08:00
Gan Eng Chin
2b477fb93f
Show create campaign button in campaigns card when there are campaign types.
2023-06-20 21:05:27 +08:00
Gan Eng Chin
81c34086fe
Display create campaign button when there are campaign types.
2023-06-20 20:54:45 +08:00
Gan Eng Chin
57220390b9
Update Codisto extension description and fix WooCommerce name typo in test.
2023-05-16 00:42:15 +08:00
Gan Eng Chin
de2aa280ef
Simplify boolean expression before && in Marketing page.
2023-03-27 21:55:42 +08:00
Gan Eng Chin
64bd683e0b
Simplify import.
2023-03-27 20:17:05 +08:00
Gan Eng Chin
ab2d56d8b3
Move card and slider into coupons directory.
2023-03-27 19:56:40 +08:00
Gan Eng Chin
48c50afcbf
Move RecommendedExtensions and KnowledgeBase into coupons directory.
2023-03-27 19:56:40 +08:00
Gan Eng Chin
12ec1c88fc
Remove unused classic marketing overview component.
2023-03-24 16:56:52 +08:00
Gan Eng Chin
51a57c2808
Remove unused Button component in marketing directory.
2023-03-23 23:28:55 +08:00
Gan Eng Chin
1453351521
Simplify tests for CreateNewCampaignModal.
2023-03-22 18:38:43 +08:00
Gan Eng Chin
59c94ce24a
Fix build errors after merging from trunk.
2023-03-22 18:35:06 +08:00
Gan Eng Chin
186f1fb850
Merge branch 'trunk' into feature/37127-marketing-reload-installed-extensions
2023-03-22 18:28:39 +08:00
Gan Eng Chin
76379770a1
Fix hook file name with correct casing.
2023-03-22 16:51:25 +08:00
Gan Eng Chin
1f7a8120a3
Temporary rename file to fix casing issue.
2023-03-22 16:50:27 +08:00
Gan Eng Chin
3189f2b7f5
Reorganize code.
2023-03-22 16:44:44 +08:00
Gan Eng Chin
01492520d3
Fix JSDOC comment in UseRecommendedPluginsWithoutChannels.
2023-03-22 16:38:21 +08:00
Gan Eng Chin
5e6cd11028
Simplify naming in PluginsTabPanel.
2023-03-22 16:09:40 +08:00
Gan Eng Chin
b18e1705cd
Fix and simplify mocks in DiscoverTools tests.
2023-03-22 16:07:51 +08:00
Gan Eng Chin
7395d6939c
Fix file name for useInstalledPluginsWithoutChannels.
2023-03-22 15:59:37 +08:00
Gan Eng Chin
e281c09bc6
Merge branch 'trunk' into feature/34907-marketing-exclude-channels
...
Conflicts:
plugins/woocommerce-admin/client/marketing/hooks/index.ts
2023-03-21 23:33:41 +08:00
Gan Eng Chin
637fca8df5
Rename file UseInstalledPlugins to UseInstalledPluginsWithoutChannels.
2023-03-21 23:23:39 +08:00
Gan Eng Chin
648eab74eb
Change namings in useInstalledExtensions to useInstalledPluginsWithoutChannels.
2023-03-21 23:22:39 +08:00
Gan Eng Chin
fab90dc712
Fix incorrect data while loading in useRecommendedPlugins.
...
See the incorrect data issue in https://github.com/woocommerce/woocommerce/pull/37126#discussion_r1141936304 .
2023-03-21 22:28:05 +08:00
Gan Eng Chin
e4a8d17ed3
Rename file useRecommendedPlugins to useRecommendedPluginsWithoutChannels.
2023-03-21 21:13:19 +08:00
Gan Eng Chin
b129dd5173
Change namings and add docs in useRecommendedPlugins.
2023-03-21 21:12:00 +08:00
Gan Eng Chin
c6bcf9fa67
Fix incorrect data while loading in useRecommendedPlugins.
...
See the incorrect data issue in https://github.com/woocommerce/woocommerce/pull/37126#discussion_r1141936304 .
2023-03-21 19:30:24 +08:00
Gan Eng Chin
fe4e28d511
Rename UseInstalledPlugins to UseInstalledExtensions.
...
Also change related names from "plugin" to "extension".
2023-03-21 19:08:13 +08:00
Gan Eng Chin
50c391cee0
Use fallback value instead of default value in useInstalledPlugins.
2023-03-21 18:35:38 +08:00
Gan Eng Chin
79023a4a10
Fix incorrect data while loading in useInstalledPlugins.
2023-03-21 18:33:57 +08:00