Commit Graph

20858 Commits

Author SHA1 Message Date
David Remer
ad8a1b8a91 Test only real revenue is returned
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
12028056db Add test that revenue status is updated correctly
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
7ac2065b1a Track purchases regardless of status but return revenue status correctly
When we apply this commit every purchase will be tracked. When the shop manager updates an order
the status will be updated. For the statistics it will only return values for purchases with
the 'completed' status

[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
bba7786e7e Store current order status in revenue statistics
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
2e85a5b624 Extract receiving the click from date to private method
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
317fdee2b6 Use getPurchaseStates helper method for past orders
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
7a2ddd0053 Track only completed orders
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
73f669a656 Listen to all status changes
This commit listens to all status changes but does not
alter the business logic as of yet.

[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
30eafb9146 Extract purchase states to helper method
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
Jan Lysý
2ebad5f7fb Add new filter for hidding DocsBot widget
[MAILPOET-5559]
2023-09-11 11:29:55 +02:00
Jan Lysý
b63d6aa336 Update 3rd party description's settings
[MAILPOET-5557]
2023-09-11 10:23:23 +02:00
Jan Lysý
d67d92a14c Add stopping propagation for DocsBot to avoid conclict on WP.com
[MAILPOET-5566]
2023-09-07 15:03:29 +02:00
Brezo Cordero
59f4739fc9 Remove mailpoet_beacon_articles
[MAILPOET-5551]
2023-09-07 14:50:35 +02:00
Brezo Cordero
8d833ae982 Replace HelpScout with DocsBot in translation string
[MAILPOET-5551]
2023-09-07 14:50:35 +02:00
Brezo Cordero
7e0a361b03 Rename HelpScout/Beacon
One of the hardest problems in programming. Name changed to represent what the class is for now that we have removed the beacon. Hopefully.

[MAILPOET-5551]
2023-09-07 14:50:35 +02:00
Brezo Cordero
9c958600eb Remove unnecessary padding
The new Help floating button does not overlay the pagination

[MAILPOET-5551]
2023-09-07 14:50:35 +02:00
Brezo Cordero
e4148c123a Remove mailpoet_form_preview_modal_overlay
This was used to hide the HS beacon behind the form preview overlay and it is not working any more

[MAILPOET-5551]
2023-09-07 14:50:35 +02:00
Brezo Cordero
3104b61005 Remove data-beacon-article
[MAILPOET-5551]
2023-09-07 14:50:35 +02:00
Rodrigo Primo
f43486971d Rename maybeDbUpdate() to maybeRunActivator()
Changing the name as this method might change other things besides just
the database.

[MAILPOET-5564]
2023-09-07 11:02:05 +02:00
Rodrigo Primo
1f05bfb238 Move maybeDbUpdate() to its own action to run it earlier
Before this commit, maybeDbUpdate() was called inside Initializer::initialize(). This method is called using the WP `init` hook with a priority of `10`. To avoid running into situations where MailPoet code is executed before database changes are applied, we need to run maybeDbUpdate() as early as possible. To achieve this, this commit moves maybeDbUpdate() to its own action still using the `init` hook but with a priority of PHP_MIN_INT.

For more information of the potential problems of running the database changes too late check this example: pcNwfB-2V6-p2.

[MAILPOET-5564]
2023-09-07 11:02:05 +02:00
 Ján Mikláš
12f797c223 Fix capitalization of MailPoet and Premium
[MAILPOET-5579]
2023-09-07 10:51:00 +03:00
David Remer
e53cfa95e8 Add method getSubscribedSegmentIds
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
David Remer
974559876b Add comments
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
David Remer
79999f53c3 Fix formatting
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
David Remer
ce4f19bd77 Do not resubscribe subscribers unnecessarily
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
David Remer
d7885621b3 Fix status variable
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
David Remer
1dc77080fb Add test to verify an automation is triggered by editing a user
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
David Remer
6ca5f68be0 Test resetSubscriptions method works as expected
[MAILPOET-5555]
2023-09-06 14:45:45 +02:00
Jan Lysý
33078fb905 Remove ForkTsCheckerWebpackPlugin plugin from Newsletter editor tests
[MAILPOET-5571]
2023-09-06 11:19:20 +02:00
Jan Lysý
c3c10ff557 Remove JS compilation from JS newsletter tests
JS is compiled in the build job, so this steps seems to be redundant.
[MAILPOET-5571]
2023-09-06 11:19:20 +02:00
John Oleksowicz
34a97a0b34 Release 4.26.1 2023-09-05 09:52:33 -05:00
Rodrigo Primo
9fdd77aacf Unpin semgrep
In a previous commit, semgrep was pinned to version 1.37.0 while we
waited for a fix to 1.38.0 that was breaking our CircleCI builds. Now
that 1.38.2 was released with a fix to the problem that was affecting
us, we don't need to pin it anymore.

[MAILPOET-5565]
2023-09-04 11:42:49 -05:00
David Remer
6b32fc7bfb Show status for deactivating workflows
[MAILPOET-4941]
2023-09-04 14:43:44 +02:00
David Remer
25bf3f60e3 Add primary keys to tmp_wc_ids and tmp_wc_emails temporary tables
[MAILPOET-4401]
2023-09-04 14:22:16 +02:00
David Remer
8170391731 Add primary key to inactive_task_ids and inactive_subscriber_ids table
[MAILPOET-4401]
2023-09-04 14:22:16 +02:00
Rodrigo Primo
afb8008c09 Pin semgrep to version 1.37
Our CircleCI builds started failing with the following error:

```
semgrep scan: unknown option '--text', did you mean '--test'?
```

Example: https://app.circleci.com/pipelines/github/mailpoet/mailpoet/15393/workflows/50ca3a93-7867-4f17-91b8-9201ba16867f/jobs/261166?invite=true#step-105-1196_61

It seems the option `--text` doesn't exist anymore on semgrep 1.38. I
opened an issue asking if this was an intentional change or something
that they need to fix: https://github.com/returntocorp/semgrep/issues/8610

While we wait for a reply, I'm creating this commit pinning semgrep to
version 1.37 so that our builds continue working.

[MAILPOET-5565]
2023-09-01 14:12:24 -05:00
John Oleksowicz
e407c40ecd Fix indentation
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
a9bd65190c Clearer naming for verification method
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
fe44df1884 Prevent invalid states due to filter segment
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
77aef00652 Use constant instead of hardcoding option value
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
bb7a98ad82 Save filter segment data to queue at send time
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
38e709e3b1 Filter subscribers when creating scheduled tasks
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
f52b1343f8 Implement subscriber filtering in scheduled tasks
If a filterSegmentId is provided, ensure only subscribers who belong to
that segment get included in the scheduled task.

MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
3745b17465 Filter subscribers during sending if filterSegment present
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
9b8c4910c1 If newsletter has filterSegmentId, pause if it doesn't exist
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
2a97189d97 Add ability for SubscribersFinder to filter by dynamic segment
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
5b39092cb6 Add newsletter option for filter segment id
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
2987c61d77 Filter click stats by newsletter send time
MAILPOET-5508
2023-08-31 13:17:34 +02:00
John Oleksowicz
44b1ab580f Fix test
Both the newsletter and the statistics record need to have the sentAt
set explicitly. Fixing that caused the final check for average segment
score to fail because subscriber1 only has 2 sent emails in the past
year, resulting in a null value for engagement score, which doesn't
contribute to the average calculation.

MAILPOET-5508
2023-08-31 13:17:34 +02:00
John Oleksowicz
3b407d7060 Base open stats on emails sent in the same period
MAILPOET-5508
2023-08-31 13:17:34 +02:00