Commit Graph

175 Commits

Author SHA1 Message Date
ab23a01423 Modify the check for sender address
to implement rule for existing campaigns.

[MAILPOET-5832]
2024-01-20 13:39:23 +05:00
e0b6cf7b41 Unify responses of newsletter editing API methods with get()
[MAILPOET-5779]
2024-01-16 18:15:35 +01:00
1162b5aca1 Verify sender Address on newsletter activation
[MAILPOET-5786]
2024-01-15 19:34:21 +05:00
5735d21e4d Remove isDomainDmarcRestricted
[MAILPOET-5782]
2024-01-14 19:37:36 +05:00
1565151179 Show the campaign name alongside the subject in standard emails listing
[MAILPOET-5646]
2024-01-08 12:04:06 +05:00
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
dfe6076599 Unify quotes around IDs in error messages
[MAILPOET-5729]
2023-11-24 08:10:35 +02:00
b3665fd1bc Replace ReactStringReplace with createInterpolateElement
MAILPOET-5162
2023-11-02 17:09:49 +01:00
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
b42d579b67 Remove usages of MailPoet\Tasks\Sending from welcome scheduler
[MAILPOET-4375]
2023-11-02 12:53:36 +01:00
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
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
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
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
ea4f4b1003 Remove temporary fix for Newsletters
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
a2d04e93c5 Add endpoint to retrieve count for multiple segments
MAILPOET-5510
2023-10-04 12:59:38 +02:00
eaf82fce3f Improve naming of symlink constant
[MAILPOET-5435]
2023-09-25 03:18:34 -07:00
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
2d31cc4bc4 Symlink premium if Dotcom platform
[MAILPOET-5435]
2023-09-25 03:18:34 -07:00
26417bab52 Change Coupon API parameter from include_coupon_id to include_coupon_id
[MAILPOET-5123]
2023-09-25 02:28:51 -07:00
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
e2cf884b98 Add missing ContainerWrapper return type, fix reported errors
[MAILPOET-5569]
2023-09-20 02:36:40 -07:00
38e709e3b1 Filter subscribers when creating scheduled tasks
MAILPOET-5509
2023-08-31 14:16:10 +02:00
3b7c23262f Display subscriber stats for different time periods
MAILPOET-5508
2023-08-31 13:17:34 +02:00
06df45bb55 Refactor subscriber stats to accept startTime param
MAILPOET-5508
2023-08-31 13:17:34 +02:00
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
d845414e4c Open standard emails created in the new editor in the new editor
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
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
5f84d5af1c Add engagement summary to subscriber stats
MAILPOET-5410
2023-08-11 16:39:57 +02:00
577a82ca49 Add bulk action for removing tag from subscribers
[MAILPOET-5454]
2023-07-13 13:12:56 +02:00
aa12fd57d7 Add bulk action for tagging subscribers
[MAILPOET-5454]
2023-07-13 13:12:56 +02:00
34937e99c0 Refactor dynamic/list.jsx to dynamic/list.tsx
[MAILPOET-5407]
2023-07-05 13:11:12 +02:00
00d021109c Move ModelValidator::validateNonRoleEmail() to a new Validator class
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.

This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().

[MAILPOET-4343]
2023-05-17 12:37:22 +02:00
e636537580 Add ability to duplicate dynamic segments
MAILPOET-4635
2023-05-15 13:48:41 +02:00
9e5b5d5ebe Add backend error checking for average spent filter
MAILPOET-4987
2023-05-11 11:47:01 +02:00
edc4ab4f52 Use better name for the method that updates api keys states
[MAILPOET-5191]
2023-05-10 13:05:37 +02:00
8bf7a150e2 Report subscribers count before refreshing key statuses from the shop
[MAILPOET-5191]
2023-05-10 13:05:37 +02:00
cd5a023b35 Move onSettingsChange from Bridge service to SettingsChangeHandler
Bridge is a low level service that processes requests and responses to/from Bridge API.
This change is needed so that we can remove dependency on MailPoet\Util\License\Features\Subscribers
service from the Bridge. The dependecy is a higher level service and may easily cause a circular dependency issue.

The SettingsChangeHandler is service for handling side effects
when saving settings. This feels as a better place to put the functionality.
[MAILPOET-5191]
2023-05-10 13:05:37 +02:00
bee18084c3 Introduce underprivileged key status also for premium key
In MAILPOET-4464 we introduced the new state "valid_underprivileged".
During implementation we introduced the state for MSS key validation,
but we forgot about the premium key.

This commit adds support for the state also for premium key validation.
When the key is underprivileged we don't display any error.

We will add specific error for underprivileged keys with specific
access restrictions in follow-up commits.

[MAILPOET-5103]
2023-04-26 10:57:40 +02:00
6c2cda36b0 Run custom field data through sanitizer when saving via API
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
aa5b052e66 Handle sanitization as early as possible per best practices
Per WP security best practices, sanitization should be handled as early
as possible. So this commit move updates the calls to sanitize the
segment name and description to the part of the code where the user
input is first processed, instead of when the data is saved to the
database.

[MAILPOET-5232]
2023-04-17 14:33:51 -03:00
685af267cb Use constant, improve test and naming
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
fb93c73a34 Add premium key verification
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
fc8837e03c Filter for license provisioning
This commit adds a filter that will provision the API key. It only runs on WP.com sites with plugins.

[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
b963d8b988 Add a new WooCommerce segment based on the value of the orders
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
c507229dd2 Add unsubscribe API method
It can be used by calling:

```
$mailpoet_api = \MailPoet\API\API::MP('v1');
$mailpoet_api->unsubscribe($subscriberId);
```

[MAILPOET-5152]
2023-03-27 19:25:49 +02:00
212e01dd4c Add check that function error_log exists
[MAILPOET-5026]
2023-03-02 13:59:51 +01:00
0795c2ffff Expose the log for corrupted newsletter on listing page
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
9e62501c30 Update comment
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00
f60ae7a8ef Set dynamic also correctly for products
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00