Commit Graph

332 Commits

Author SHA1 Message Date
Oluwaseun Olorunsola
f85bd8622f Add comment explaining the usage of the method
MAILPOET-4795
2023-01-06 18:29:46 +01:00
Oluwaseun Olorunsola
503cf61c0f Do not redirect when activated with bulk activation mode
MAILPOET-4795
2023-01-06 18:29:46 +01:00
Oluwaseun Olorunsola
d9eca55189 Redirect to Landing page after plugin activation
MAILPOET-4795
2023-01-06 18:29:46 +01:00
Oluwaseun Olorunsola
e850eaa90c Add Landing page and hide behind feature flag
MAILPOET-4795
2023-01-06 18:29:46 +01:00
Rostislav Wolny
970db8f0d8 Prevent undefined function request_filesystem_credentials error
The function request_filesystem_credentials was not loaded when
running translation update during regular page load.
This commit ensures the function is loaded.
[MAILPOET-4902]
2022-12-28 13:24:47 +01:00
Rodrigo Primo
6533a1444d Display submenu entries only after the Welcome Wizard is completed
[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
Rodrigo Primo
05a109dcf4 Force users to complete the Welcome Wizard
This commit changes the behavior of the Welcome Wizard. Up until now,
the wizard would load once and users could opt to complete or skip it.
Now it is mandatory for the users to complete the wizard. Before we
saved the setting "version" the first time the first step of the wizard
was loaded and now we saved it when the wizard is completed.

[MAILPOET-4815]
2022-12-19 21:37:42 +01:00
Rodrigo Primo
4ceb508218 Fix typo 2022-12-19 21:37:42 +01:00
David Remer
12afcfb656 Improve readability
[MAILPOET-3487]
2022-12-07 11:53:48 +01:00
David Remer
7b584dd482 Add language function to twig
[MAILPOET-3487]
2022-12-07 11:53:48 +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
Rostislav Wolny
8fbc5c270a Place home at the first position in submenu
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
Rostislav Wolny
92dc5921df Set main page to homepage in case the feature is active
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
Rostislav Wolny
3c3ce37720 Temporarily add static property for MAIN_PAGE_SLUG
We need to be able to change it when homepage feature is active.
When we remove the feature flag will switch back to using constant.
Note I also kept the constant in case a third party plugin uses it.
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
Rostislav Wolny
01aa1e1e52 Refactor page slugs into constants
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
Rostislav Wolny
2bbc1b7063 Add homepage page and submenu item hidden behind feature flag
[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
Jan Jakes
882402645d Do not wrap automations beta badge, make it a bit smaller
[MAILPOET-4840]
2022-11-25 09:55:11 +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
Jan Jakes
7570c9fa0e Make automations Beta badge smaller
[MAILPOET-4836]
2022-11-22 09:23:57 +01:00
Jan Jakes
725e0ecb00 Remove automation feature flag
[MAILPOET-4788]
2022-11-14 12:35:29 +02:00
Jan Jakes
9d55d3f134 Use "automation" instead of "workflow"
[MAILPOET-4793]
2022-11-14 12:14:35 +02:00
Rodrigo Primo
64d655857b Explicitly declare compatibility with Woo High Performance Order Tables
This was done following the instructions published by the WooCommerce
team: pcShBQ-oY-p2

[MAILPOET-4726]
2022-11-07 10:42:38 +01:00
Jan Jakes
96368cbd3f Move one-time migrations from populator to the new initial migration
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
9730fb9272 Move the old dbDelta-based migrator to a migration
This will ensure it runs once and from there, it will continue using the new migrations.

[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
f65821256c Run migrations on activation
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
3dd6ef3da7 Implement WP CLI command to run migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
c9c35d591b Update URLs in email templates
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
Jan Jakes
ccb5369c57 Use https everywhere for www.mailpoet.com
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
David Remer
756b0587bc Return an empty string for footer when on automation page
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
David Remer
af3d08ff36 Add method to detect automation pages
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
David Remer
a91913e633 Make 'Give feedback' translateable
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
Rostislav Wolny
6dfeb7a100 Prevent enabling Woo Blocks integration for older versions
Version 8.0.0 was shipped with WooCommerce 6.8.0 which is the oldest currently supported Woo version.
[MAILPOET-4774]
2022-11-03 15:16:43 +01:00
David Remer
e37a824d86 Hide notices on onboarding screen
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00
Oluwaseun Olorunsola
f92ee90e9b Add support for [site:title] and [site:homepage_link]
These will add support for these two shortcodes in the Shortcode engine

MAILPOET-4599
2022-11-01 14:59:28 +01:00
Oluwaseun Olorunsola
5ed0c3fb2d Allow form display on Woo Shop listing page
The WooCommerce Shop page is a special kind of page. It’s basically a post archive.

The Shop page is a placeholder for a post type archive for products. It may render differently than other pages in your install.
https://woocommerce.com/document/woocommerce-pages/#section-4

It doesn’t have any content and WooCommerce core team is also removing the the-content filter from the Shop listing page hence why we are unable to hook into the the-content filter we use for other parts of the codebase

MAILPOET-4663
2022-11-01 14:58:47 +01:00
Jan Lysý
76b1166269 Add methods for batch changes
Because sometimes can be difficult to get updated and created subscribers, I decided to create methods that doesn't need subscriber ids.
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
b716b427a7 Fix UTC time for changes
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
c1ac9f7922 Add test case on notifications during shutdown
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
a09a9cdcbf Add typecast to batch methods
Because functions can return ids as a string, the typecast is necessary to avoid type errors.
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
2d835cdec1 Add new action hooks for multiple changes
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
1e147c9dd5 Add notify actions for multiple subscribers
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
6f89b47b30 Store time of change in SubscriberChangesNotifier
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
4fe5219b89 Add notifying about changes to the shutdown hook
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
Jan Lysý
2dab7fdb0c Add new service for handling subscriber changes
This new service should store all changes and notify about them at the end of the HTTP request.
[MAILPOET-4727]
2022-10-27 09:31:40 +02:00
David Remer
c4e7ea4c8e Use addFilter instead of addAction
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
David Remer
ce462f1643 Close correct HTML element type
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
David Remer
91936aff92 Rename Automation to Automations in Menu
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00
David Remer
57858bbe9a Move Automation menu item between Emails and Forms
[MAILPOET-4728]
2022-10-25 12:04:44 -05:00