Commit Graph

107 Commits

Author SHA1 Message Date
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
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
Jan Lysý
aa12fd57d7 Add bulk action for tagging subscribers
[MAILPOET-5454]
2023-07-13 13:12:56 +02:00
Rodrigo Primo
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
John Oleksowicz
e636537580 Add ability to duplicate dynamic segments
MAILPOET-4635
2023-05-15 13:48:41 +02:00
John Oleksowicz
9e5b5d5ebe Add backend error checking for average spent filter
MAILPOET-4987
2023-05-11 11:47:01 +02:00
Rostislav Wolny
edc4ab4f52 Use better name for the method that updates api keys states
[MAILPOET-5191]
2023-05-10 13:05:37 +02:00
Rostislav Wolny
8bf7a150e2 Report subscribers count before refreshing key statuses from the shop
[MAILPOET-5191]
2023-05-10 13:05:37 +02:00
Rostislav Wolny
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
Rostislav Wolny
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
Rostislav Wolny
6c2cda36b0 Run custom field data through sanitizer when saving via API
[MAILPOET-5241]
2023-04-24 13:26:31 +02:00
Rodrigo Primo
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
Brezo Cordero
685af267cb Use constant, improve test and naming
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
Brezo Cordero
fb93c73a34 Add premium key verification
[MAILPOET-5131]
2023-04-03 12:57:31 +02:00
Brezo Cordero
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
Rodrigo Primo
b963d8b988 Add a new WooCommerce segment based on the value of the orders
[MAILPOET-4988]
2023-03-28 15:51:01 +02:00
David Remer
9e62501c30 Update comment
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00
David Remer
f60ae7a8ef Set dynamic also correctly for products
[MAILPOET-4883]
2023-02-15 12:30:41 +01:00
Sam Najian
f3bf4b36e9 Introduce endpoint to refresh mss key status
[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
Sam Najian
cf5718122f Fix the issue with verifyMssKey overriding is_approved
The verifyMssKey side effect handler was overriding the value
of is_approved when updating the state.

[MAILPOET-4633]
2023-02-13 16:56:54 +01:00
Rodrigo Primo
ad4247a241 Add API endpoint to delete a setting
[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
Sam Najian
94b5803337 Cleanup coupon data from template on save
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
Jan Lysý
07954dd968 Extract domain verification error messages from bridge to strings
As a part of those changes I tried to unify the array key with error messages.
[MAILPOET-4639]
2023-01-16 13:46:07 +01:00
David Remer
5802f2132d Use badRequest method instead of throwing an InvalidState exception
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
David Remer
8e502e5f50 Rename save method to create
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
David Remer
0187f0cede change date keys
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
David Remer
5b93b88f46 Add Tags endpoint
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
Oluwaseun Olorunsola
210c240aab Update ConfirmationEmailMailer to support custom confirmation email created with the email editor from template
Setup confirmation email customizer in ConfirmationEmailMailer and trigger confirmation email template creation when visual subscription confirmation emails is enabled from settings

MAILPOET-4649
2022-12-15 18:15:01 +01:00
Oluwaseun Olorunsola
53dda33c02 Update method and constant name
MAILPOET-4760
2022-12-05 10:25:28 +01:00
Oluwaseun Olorunsola
9b9f61bf13 Only queue test mail for sending when the mailpoet sending method is updated
MAILPOET-4760
2022-12-05 10:25:28 +01:00
Oluwaseun Olorunsola
0bd627d3b1 Add support for checking misconfiguration of the PHP mail function
Some hosts do perform intentional misconfiguration of the mail function, causing it not to work.

When the mail function is misconfigured, we can still access and execute the mail function from within the codebase, but we get an error.

There’s no accurate way to know the PHP mail function is misconfigured. Unless we execute the function with all the proper parameters and check the exception error message against this error `Could not instantiate mail function.`

MAILPOET-4760
2022-12-05 10:25:28 +01:00
Jan Jakes
926620e8f8 Ignore strict types rule in all existing files that don't have it
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
John Oleksowicz
37067dff67 Add state to MSS key check response
[MAILPOET-4641]
2022-11-28 14:12:50 +01:00
Sam Najian
db94ec52e6 Acknowledge error code 403 with a different message
When recieving error code 403 from the Bridge, it's treated
as success but with with different message

[MAILPOET-4464]
2022-10-17 12:15:07 +02:00
Jan Lysý
f1b59173dd Add filters into newsletter response
[MAILPOET-4583]
2022-10-05 14:14:34 +02:00
Jan Lysý
7e6f708df8 Create tags when do not exist
[MAILPOET-4557]
2022-09-28 11:42:51 +02:00
Oluwaseun Olorunsola
d50aee988e Extract logic to get email domain to Helpers class
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Oluwaseun Olorunsola
a006701d78 PR feedback: add type hints, create new methods and save on extra api request
MAILPOET-4601
2022-09-26 11:13:40 +02:00