Commit Graph

19029 Commits

Author SHA1 Message Date
acbd7fe723 Change the test to avoid use of $this 2023-07-11 14:41:23 +01:00
61a8e65a06 Remove bracelets 2023-07-11 14:41:23 +01:00
7f662a7077 Removed $this and added parameters 2023-07-11 14:41:23 +01:00
4e192d6b9a Improve the test subscribers count shortcode
[MAILPOET-5323]
2023-07-11 14:41:23 +01:00
418bf157d8 Release 4.20.2 2023-07-11 13:34:44 +02:00
bc031e5936 Fix acceptance tests with WC latest
[MAILPOET-5449]
2023-07-10 10:52:53 -05:00
8bf3eddf09 Return cached item for homepage stats
MAILPOET-5439
2023-07-10 11:04:33 +02:00
52dba60b7b Improve managing segments test
[MAILPOET-5329]
2023-07-06 13:58:19 +03:00
0f80c03fe6 Improve the scenario creating editing segment
[MAILPOET-5329]
2023-07-06 13:58:19 +03:00
43c7e457ca Visit admin page first to install automate woo tables
AutomateWoo currently does not create its database tables until youy
visit an admin page. Starting with version 5.8.1, this was causing some
tests to fail because AutomateWoo was trying to run a scheduled task
that relied on a database table that didn't exist yet. This is a quick
attempt to fix this by visiting the admin to trigger table creation.

MAILPOET-5449
2023-07-05 14:28:35 -05:00
fd17a1aa42 Ensure confirmation emails enabled
These tests have a final assertion that assumes confirmation emails are
enabled. If a previous test switched confirmation emails off, these
would fail.

MAILPOET-5449
2023-07-05 14:28:35 -05:00
ac40e3d802 Refactor segments.jsx to segments.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
34937e99c0 Refactor dynamic/list.jsx to dynamic/list.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
4583b80fa6 Move SegmentResponse type to types.ts to be able to reuse it
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
75ed1681e8 Refactor list.jsx to list.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
ad6d92f2f7 Refactor heading.jsx to heading.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
f991b40a6f Refactor form.jsx to form.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
5e016b2b17 Improved the test for segment newsletter stats
[MAILPOET-5328]
2023-07-05 12:22:49 +03:00
d17d9ce246 Remove one more deprecated method from the Segment model
This methods was deprecated a long time ago and it is not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
bb16e94a5b Remove deprecated methods from the Segment model
Those methods were long deprecated and are not used anymore.

[MAILPOET-5455]
2023-07-05 12:09:22 +03:00
fb08b3e7ec Make sure long option names don't break the select layout
The segment `used shipping method` might contain long names that are
displayed inside the select box to select shipping method names. Those
long names were breaking the layout of the select box. This commit fixes
this problem by adding a scrollbar to each option when needed.

See https://github.com/mailpoet/mailpoet/pull/4967#issuecomment-1602425406

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
841745c706 Remove shipping method IDs from the 'used shipping method' query
This commit simplifies the logic of the 'used shipping method' segment
by removing the shipping method IDs from the queries. After some
considering, we have come to the conclusion that using just the shipping
method instance ID is enough.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
60d3aa853c Fix prettier formatting issues during rebase
For some reason those issues were not fixed automatically. I will
investigate if I'm missing a pre-commit hook or something in my
environment.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
f20878f7f3 Update the queries of the 'used shipping method' filter
This commit changes the logic of the code that builds the queries for
the 'used shipping method' filter. The initial implementation relied
only on the shipping method name that is stored in
wp_woocommerce_order_items.  This implementation did not work as the
name is not unique. The new implementation use the shipping method id
and the instance id that are stored in wp_woocommerce_order_itemmeta and
the combination of both fields is unique.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
993e292fd0 Fix typo
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
f85b7a52fc Change logic of the code to build the 'used shipping method' segment UI
This commit fixes an issue with the initial logic used to retrieve
shipping methods to build the UI of the 'used shipping method' segment.
It updates the code to properly retrieve WooCommerce shipping methods
configured for all zones. Before the code was getting just the shipping
method types and the shipping method instances.

The query that is used to get the subscribers that match this segment
will be updated in another commit.

[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
5447e253e5 Add backend logic to handle new "used shipping method" segment
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
243c096643 Add UI for new "used shipping method" segment
[MAILPOET-4992]
2023-07-04 22:23:06 +02:00
4a26d3a067 Additional scenario added
[MAILPOET-5322]
2023-07-04 17:46:55 +02:00
fcf164a67d Include one more newsletter and segment
[MAILPOET-5322]
2023-07-04 17:46:55 +02:00
530addfa5f Improve the test archive page
[MAILPOET-5322]
2023-07-04 17:46:55 +02:00
dc4788d440 Release 4.20.1 2023-07-04 14:46:59 +03:00
96d78554ba Update tests to include await and update helper method
[MAILPOET-5451]
2023-07-04 13:38:29 +02:00
5d88f02216 Replace multiple subscriber update queries with one in sending loop
[MAILPOET-5178]
2023-07-03 16:52:46 +02:00
764114edc7 Replace two counting DB queries with arithmetic in sending loop
[MAILPOET-5178]
2023-07-03 16:52:46 +02:00
aadd6d6dba Fix email action styles
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
f89cd3d84f Improve method name
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
43a540c03c Order emails by order in automation
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
53f58fd1a4 Use one formatter
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
87ef876f73 Add whitespace only when subvalue empty
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
f5046ca445 Ensure string in link
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
190da3b0e5 Use WooCommerce wrapper instead of native functions, test if WC is active
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
8b1d51fcd6 Apply prettier 2023-07-03 12:44:07 +02:00
c03a3becc4 Use WooCommerce abstraction from automations instead of MP 2023-07-03 12:44:07 +02:00
2203629991 Fix small styling issues
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
3b8569e47e Ensure newsletter exists
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
4c6f0ff073 Add interactive elements to email tab
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
1bd4050c1a Format prices in frontend
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
be29c00f08 Add price formatter
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00
49a83b3760 Remove padding from components popover
[MAILPOET-5092]
2023-07-03 12:44:07 +02:00