Commit Graph

164 Commits

Author SHA1 Message Date
Jan Jakes
f483d40c19 Clean settings cache when reinstalling the plugin 2024-09-13 10:34:55 +02:00
Rostislav Wolny
f3d6813d97 Load data inconsistencies async from API
[MAILPOET-6219]
2024-09-11 15:19:35 +02:00
Rostislav Wolny
33f4b2d729 Replace usage of WP's current_time without gmt parameter in libs
This commit replaces usages by Carbon::now or in case we need a timestamp it
keeps current_time but adds the gtm parameter as true.
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
Jan Jakes
0584c63180 Replace old model table name constants with Doctrine repositories
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
Rostislav Wolny
f022cc23fc Allow pingBridge endpoint for all users with access to the plugin admin
We call the endpoint on the admin pages and the restricted access was causing
that editor users were getting false error notices.
[MAILPOET-6189]
2024-08-14 11:54:28 +03:00
Rostislav Wolny
cb5f533e54 Add API for fixing inconsistent data
[MAILPOET-1587]
2024-08-08 15:37:32 +02:00
Pavel Dohnal
dec9a02ca4 Replace join query with a simple query
[MAILPOET-6148]
2024-07-19 15:03:35 +02:00
 Ján Mikláš
4af5720741 Refactor help endpoint
[MAILPOET-5755]
2024-07-04 08:04:34 +02:00
 Ján Mikláš
5253d79e81 Use types in new class properties
[MAILPOET-5755]
2024-07-04 08:04:34 +02:00
 Ján Mikláš
5847918409 Return 400 instead of 404 in Help API
[MAILPOET-5755]
2024-07-04 08:04:34 +02:00
 Ján Mikláš
88c0836443 Create endpoints to cancel and reschedule tasks
[MAILPOET-5755]
2024-07-04 08:04:34 +02:00
alex-mpoet
a6caf0a1e6 Add bridge ping endpoint
[MAILPOET-6030]
2024-06-12 11:16:51 +02:00
alex-mpoet
c59ae2d82c Add cron pinging endpoint
[MAILPOET-6029]
2024-06-10 17:07:31 +02:00
Oluwaseun Olorunsola
070fd30b6e Update the notice message to fix consistency
MAILPOET-6022
2024-06-07 17:17:57 +02:00
Oluwaseun Olorunsola
4f63437ccc Add html to the error message
MAILPOET-6022
2024-06-07 17:17:57 +02:00
Oluwaseun Olorunsola
95e595de42 Invalid API endpoint exception improvement
MAILPOET-6022
2024-06-07 17:17:57 +02:00
John Oleksowicz
6675a616b5 Display proper notices for segment actions
This updates some of the segment listing messages to include the name of
 the segment to avoid confusion, and allows for the possibility that
 bulk actions will work for some segments but not all, in which case we
 need to show both success and error messages.

MAILPOET-5395
2024-04-24 12:59:37 +02:00
Jan Lysý
423ce62100 Add lastSubscribedAt to the subscribers API response
[MAILPOET-5894]
2024-03-22 11:09:42 +01:00
Mike Jolley
435f638011 Apply rules on lib dir 2024-03-21 16:57:59 +01:00
Jan Lysý
60bf440bff Add check that updatedAt is set
[MAILPOET-5860]
2024-03-18 08:55:44 -05:00
Jan Jakes
4b3744717f Revert "Unify responses of newsletter editing API methods with get()"
This reverts commit e0b6cf7b41.

In the next commit, I will add a different fix for this issue.

[MAILPOET-5833]
2024-02-05 13:28:15 +01:00
Jan Jakes
d6da2af55b Extract newsletter bulk delete logic to a controller
Repositories shouldn't inject other repositories. Also, this solves circular DI dependency.

[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Rodrigo Primo
0409747216 Remove outdated code comment
This class doesn't use MailPoet\Tasks\Sending anymore.

[MAILPOET-5684]
2024-01-31 12:21:54 +01:00
Rodrigo Primo
19b33e15f5 Refactor SendingQueue::add() to use Doctrine instead of Tasks\Sending
[MAILPOET-5684]
2024-01-31 12:21:54 +01:00
Brezo Cordero
ab23a01423 Modify the check for sender address
to implement rule for existing campaigns.

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
Jan Jakes
e0b6cf7b41 Unify responses of newsletter editing API methods with get()
[MAILPOET-5779]
2024-01-16 18:15:35 +01:00
Brezo Cordero
1162b5aca1 Verify sender Address on newsletter activation
[MAILPOET-5786]
2024-01-15 19:34:21 +05:00
Brezo Cordero
5735d21e4d Remove isDomainDmarcRestricted
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
Rostislav Wolny
1565151179 Show the campaign name alongside the subject in standard emails listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
Oluwaseun Olorunsola
b3665fd1bc Replace ReactStringReplace with createInterpolateElement
MAILPOET-5162
2023-11-02 17:09:49 +01:00
Oluwaseun Olorunsola
4dba4f8b6a Add KB link to the error message "Your MSS key is already used on another site"
MAILPOET-5162
2023-11-02 17:09:49 +01:00
Rodrigo Primo
d4a80c7230 Move SendingQueueEntity::toArray() to SendingQueuesResponseBuilder::build()
Based on a suggestion during the review of the PR, it was decided that
it makes more sense for the code that was created as
SendingQueueEntity::toArray() tp be moved to
SendingQueuesResponseBuilder::build(). It is used only to build the
format that is send in the API response.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
508fdd7756 Refresh Doctrine entities in SendingQueue::add() to avoid issues
Since SendingQueue::add() still uses Paris, it was running into some
problems caught by our integration tests since some Sending methods
where refactored to Doctrine. The issue was that we started loading some
Doctrine entities earlier, then Paris code inside SendingQueue::add()
would change the same rows, causing the Doctrine entities to contain
stale data. To workaround this problem, in this commit, we are making
sure that the Doctrine entities are refreshed after they are changed by
Paris.

I considered refactoring SendingQueue::add() to use Doctrine but I
wasn't sure what to do with SendingTask::create() and
SendingTask::createFromQueue() so I decided to take a different
approach.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
Rodrigo Primo
dc1cee5118 Replace Newsletter model with NewsletterEntity in SendingQueue
This was the easiest way to fix failing integration tests related to
updating some Sending methods to use Doctrine instead of Paris. Using
Paris in SendingQueue to update the database was creating a state where
Doctrine had stale data and this was causing the tests to fail.

[MAILPOET-4368]
2023-10-25 21:09:39 +02:00
John Oleksowicz
53bc5a2505 Ensure filter segments display for draft/scheduled
This is only tangentially related to this ticket. I noticed during
testing that the filter segment tag was not showing up in listings for
standard newsletters that were drafts or scheduled. This is because
options weren't included in the response for standard newsletters.

MAILPOET-5512
2023-10-16 10:22:22 +02:00
Jan Lysý
ea4f4b1003 Remove temporary fix for Newsletters
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
John Oleksowicz
a2d04e93c5 Add endpoint to retrieve count for multiple segments
MAILPOET-5510
2023-10-04 12:59:38 +02:00
Brezo Cordero
eaf82fce3f Improve naming of symlink constant
[MAILPOET-5435]
2023-09-25 03:18:34 -07:00
Brezo Cordero
d0e72c8fa8 Ignore exceptions when symlink premium
This is a nice to have and should not block the installation.

[MAILPOET-5435]
2023-09-25 03:18:34 -07:00
Brezo Cordero
2d31cc4bc4 Symlink premium if Dotcom platform
[MAILPOET-5435]
2023-09-25 03:18:34 -07:00
Jan Lysý
26417bab52 Change Coupon API parameter from include_coupon_id to include_coupon_id
[MAILPOET-5123]
2023-09-25 02:28:51 -07:00
Jan Lysý
79d506ca34 Create new API endpoint for WC coupons
Because I haven't found an easy way how to use WP or WC API,
I decided to create a MailPoet endpoint for getting coupons that
allows me loading them via Ajax.
[MAILPOET-5123]
2023-09-25 02:28:51 -07:00
John Oleksowicz
38e709e3b1 Filter subscribers when creating scheduled tasks
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
3b7c23262f Display subscriber stats for different time periods
MAILPOET-5508
2023-08-31 13:17:34 +02:00
John Oleksowicz
06df45bb55 Refactor subscriber stats to accept startTime param
MAILPOET-5508
2023-08-31 13:17:34 +02:00
Rostislav Wolny
ce6a5a6a66 Do not save newsletter templates when for Gutenberg emails
This will be disabled to prevent saving empty templates.
We will decide how/if we support templates in the future.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
d845414e4c Open standard emails created in the new editor in the new editor
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
David Remer
76c299c3d7 Remove global count methods.
In the previous commit, we removed the global count for our output. This commit removes
the logic as the only places where it was used was in recalculating the cache and since
the last commit, we do not use this value anymore

[MAILPOET-4487]
2023-08-18 13:35:13 +02:00
John Oleksowicz
5f84d5af1c Add engagement summary to subscriber stats
MAILPOET-5410
2023-08-11 16:39:57 +02:00
Jan Lysý
577a82ca49 Add bulk action for removing tag from subscribers
[MAILPOET-5454]
2023-07-13 13:12:56 +02:00