Commit Graph

9 Commits

Author SHA1 Message Date
John Oleksowicz
b1dd110bf8 Add lookup data retrieval for used shipping method
For ease of lookup, I changed the helper to return an array with keys
corresponding to the instanceId of the shipping methods. I couldn't see
anywhere else in the codebase where the keys would have mattered.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
Rodrigo Primo
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
Rodrigo Primo
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
John Oleksowicz
cd0b795ac8 Extract customer creation/cleanup
This also ensures that cleanup always runs after all integration tests

MAILPOET-5145
2023-04-07 12:11:12 -05:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
Rodrigo Primo
54b68712e9 Add basic test to cover the happy path of WooCommerce\Helper::getOrdersCountCreatedBefore()
[MAILPOET-4570]
2022-10-03 15:10:36 +02:00
Rostislav Wolny
ed5bd8de61 Add Woo dependent tests to woo group
Mark all integration tests that are related to WooCommerce with group "woo".
[MAILPOET-4566]
2022-09-08 13:02:52 +02:00
Rodrigo Primo
ffecdf8528 Use update_option() instead of add_option()
See https://github.com/mailpoet/mailpoet/pull/4277#discussion_r933531137

[MAILPOET-4491]
2022-08-04 10:18:44 +02:00
Rodrigo Primo
13e06fe0cb Add helper method to check if MailPoet was installed via WooCommerce
The method will return true if MailPoet was installed via the
WooCommerce onboarding wizard and false otherwise.

[MAILPOET-4491]
2022-08-04 10:18:44 +02:00