Commit Graph

144 Commits

Author SHA1 Message Date
Rostislav Wolny
a698e416ad Allow all permanent notices on all pages except the wizard page
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
Rostislav Wolny
49d9dd666b Fix coding styles issues in DisableMailFunctionNotice
[MAILPOET-4760]
2022-12-05 11:59:16 +01:00
Oluwaseun Olorunsola
53dda33c02 Update method and constant name
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
Oluwaseun Olorunsola
99d0eede80 Add tests for DisabledMailFunctionNotice
MAILPOET-4760
2022-12-05 10:25:28 +01:00
Oluwaseun Olorunsola
d09b4ca409 Add check for mail function and display notice if disabled
MAILPOET-4760
2022-12-05 10:25:28 +01:00
Rostislav Wolny
f369e399ed Distinguish main page and emails page
There are some cases where we link or redirect to main page but
actually we want to redirect to emails page. It happens that currently they are
the same page, but we need to distinguish these cases for the future when
we switch the main page to new homepage.
[MAILPOET-4824]
2022-11-30 11:42:41 +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
David Remer
4832771185 Refactor the captcha system
The current Captcha class has a lot of responsibilities. It renders the captcha
image, can check if a certain captcha type is a Google captcha, if a captcha is
required for a certain email. The SubscriberSubscribeController is not only in
charge of "controlling" the subscription process but also validates, whether a
captcha is correct or not. This architecture made it difficult to extend the
functionality and introduce the audio captcha feature.

Therefore this commit refactors the captcha architecture and tries to seperate
the different concerns into several classes and objects. Validation is now done
by validators.

The CaptchaPhrase now is in charge of keeping the captcha phrase consistent
between the image and the new audio, so that you can renew the captcha and both
captchas are in sync.

[MAILPOET-4514]
2022-11-24 09:20:39 +01:00
 Ján Mikláš
f8c17730fc Update tracking campaign
[MAILPOET-4712]
2022-11-14 11:22:57 +01:00
Rostislav Wolny
93e43eee7a Update sales banner for Black Friday 2022
[MAILPOET-4712]
2022-11-14 11:22:57 +01:00
Sam Najian
235552f91d Define Request utility class with isPost method
[MAILPOET-4703]
2022-11-11 09:21:30 +01:00
Sam Najian
8e69299a6a Adjust naming and use wp wrapper I/O of direct usage
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
Sam Najian
e3539b06a2 Define URL utility method to check if url is using https
[MAILPOET-4702]
2022-11-09 12:36:44 +01:00
 Ján Mikláš
a1c9be337f Update Black Friday content
- added timezone to sale duration
- changed date format
- link to annual billing period
- added tracking
- switch dates in "shouldDisplay" condition, so it reads as "from to" rather than "to from"
- capitalized button

[MAILPOET-4670]
2022-09-27 11:05:34 +02:00
Rostislav Wolny
b2e6cccc3a Update Black Friday notice for the current year campaign
[MAILPOET-4670]
2022-09-27 11:05:34 +02:00
Oluwaseun Olorunsola
d50aee988e Extract logic to get email domain to Helpers class
MAILPOET-4601
2022-09-26 11:13:40 +02:00
Jan Jakes
24cca1ba04 Cache total subscribers count, add tests
[MAILPOET-4416]
2022-08-24 12:18:44 +02:00
Rostislav Wolny
1ede10fce6 Update list of popular free ESP domains
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Rostislav Wolny
4ffdd5bed5 Add declare(strict_types = 1); to newly added PHP files
[MAILPOET-4302]
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
fcd12b41b5 Update DMARC Status check
Handle edge case for domains where DMARC `p` policy is set to  reject or quarantine but `sp` (subdomain policy) is set to none

The previous implementation will return dmarcStatus === none when
sp is none but will not check for p policy as well.

If the `sp` is reject or quarantine, it would supersede the `p` status

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
f09616dc46 General refactor
Use a single click handler for css lookup

Set to mailpoet-js-button-authorize-email-and-sender-domain

MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
c961e0a363 Add AuthorizedSenderDomainController class and tests
MAILPOET-4302
2022-08-11 12:36:23 +02:00
Oluwaseun Olorunsola
601b3e775b Add DMARC Policy Checker class and
getDomainDmarcPolicy method

MAILPOET-4302
2022-08-11 12:36:23 +02:00
David Remer
218de96024 Fix WordPress.WP.I18n.MissingTranslatorsComment errors
[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
David Remer
b05e6d414c Remove WP\Functions::__ and other translate functions
Under the new sniffer rules, those functions produce errors and, when those methods
are used, the sniffer can not properly be applied.

[MAILPOET-4524]
2022-08-09 13:23:16 +02:00
Jan Lysý
50e98a6273 Remove old model from InactiveSubscribersNotice
[MAILPOET-4356]
2022-07-21 15:35:50 +02:00
Jan Lysý
e28aa7ed46 Remove old model from BlackFridayNotice
[MAILPOET-4356]
2022-07-21 15:35:50 +02:00
Oluwaseun Olorunsola
19b9ab8183 Hijack link to MP Shop, show email authorization modal on notices
MAILPOET-4300
2022-07-18 12:53:49 +02:00
Ján Mikláš
f10596feec Fix typos in translations
[MAILPOET-4447]
2022-06-20 10:17:24 +02:00
Jan Lysý
d363c933ea Add strict types declaration
[MAILPOET-4142]
2022-05-23 11:38:32 +02:00
Jan Lysý
98dde764a6 Add warning about deprecated filter
[MAILPOET-4142]
2022-05-23 11:38:32 +02:00
Sam
7631042f3d Revert "Revert "Check post-types validity for requests""
This reverts commit fdb4663ca1.
2022-04-18 11:43:47 +02:00
Rodrigo Primo
fdb4663ca1 Revert "Check post-types validity for requests"
This reverts commit b800cf189f.
2022-04-11 16:30:59 -03:00
Sam Najian
b800cf189f Check post-types validity for requests
[MAILPOET-4082]
2022-04-11 14:54:56 -03:00
Sam Najian
8f377d9308 Make default value for $linkTag of replaceLinkTags explicit
[MAILPOET-3992]
2022-04-11 15:30:29 +02:00
John Oleksowicz
fc1f3e6dc2 Inline generateToken for clarity
The only thing Security::generateToken was providing was a default value
 for the $action, which created a pattern of using the same $action
 everywhere, which may not be the best way to go.

 Since it was essentially a wrapper for WP's built-in nonce functions,
 it seemed clearer to use those functions directly to be more explicit
 about how we're handling tokens.

[MAILPOET-2030]
2022-04-11 10:29:35 +02:00
David Remer
9f39843189 Sanitize incoming data according to WP sniffer
[MAILPOET-4219]
2022-04-04 17:12:33 +02:00
Jan Lysý
6d920d8c69 Store email volume limit to window
[MAILPOET-4047]
2022-03-01 10:58:31 +01:00
Jan Lysý
69769697ab Add handling new type of error for email volume limit
[MAILPOET-4047]
2022-03-01 10:58:31 +01:00
Brezo Cordero
a1455c9f46 Remove Util\Notices\DeprecatedShortcodeNotice
[MAILPOET-3899]
2022-02-28 09:42:56 +01:00
John Oleksowicz
5e9728c91a Migration and tests for new default value
[MAILPOET-4061]
2022-02-07 14:37:08 +01:00
Jan Lysý
3f07e591c8 Fix integration tests compatibility with PHP 8.1
[MAILPOET-4053]
2022-01-19 13:14:42 +01:00
Jan Jakes
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00