Commit Graph

332 Commits

Author SHA1 Message Date
Rostislav Wolny
1bc331760e Add also catching of other exceptions when running migrations
[MAILPOET-5627]
2023-10-09 12:24:15 +02:00
Rostislav Wolny
7d96cada42 Catch activation in progress exception when it runs on version check
[MAILPOET-5627]
2023-10-09 12:24:15 +02:00
Rostislav Wolny
af32b36af2 Initialize editor hooks only if the new editor feature is active
[MAILPOET-5624]
2023-10-09 11:33:11 +02:00
Jan Jakes
2a676353aa Render "after_javascript" block after other scripts
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Rostislav Wolny
125d5e9d1f Fix Redirect to the landing page after activation
When the plugin was not activated on the WP plugins page (e.g., via WC NUX)
we forgot to clean the activation flag. That caused us to redirect
to the landing page on a subsequent plugin activation, even if the user activated
a different plugin.

This commit fixes the issue by making sure the PLUGIN_ACTIVATED flag is unset even when plugin
is not activated from WP plugins page.
[MAILPOET-5221]
2023-09-27 18:58:04 +02:00
Brezo Cordero
c12438db08 Add filter to remove restriction on Woo Express
[MAILPOET-5573]
2023-09-25 07:02:19 -07:00
Rostislav Wolny
bd539e386b Add initialization for core blocks renderers
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
b70ad064c7 Refactor initialization of the email editor
This changes how the editor is initialized. The integration initialization class
doesn't get the engine class anymore, but integration is initialized via
mailpoet_email_editor_initialized action triggered from the engine.

This allows multiple integrations to hook into the engine.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
John Oleksowicz
0e770ed649 Use CarbonImmutable instead of Carbon
MAILPOET-5574
2023-09-11 13:49:57 +02:00
John Oleksowicz
000cb5e6d5 Add limit to mailpoet_archive shortcode
MAILPOET-5574
2023-09-11 13:49:57 +02:00
John Oleksowicz
aa480a8c66 Add ability to display last n days of newsletters
MAILPOET-5574
2023-09-11 13:49:57 +02:00
John Oleksowicz
ec71b44648 Add ability to filter mailpoet_archive by subject
MAILPOET-5574
2023-09-11 13:49:57 +02:00
John Oleksowicz
a0c1a137d6 Update mailpoet_archive to accept date params
MAILPOET-5574
2023-09-11 13:49:57 +02:00
David Remer
c487576e18 Track refunds
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
73f669a656 Listen to all status changes
This commit listens to all status changes but does not
alter the business logic as of yet.

[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
30eafb9146 Extract purchase states to helper method
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
Brezo Cordero
3104b61005 Remove data-beacon-article
[MAILPOET-5551]
2023-09-07 14:50:35 +02:00
Rodrigo Primo
f43486971d Rename maybeDbUpdate() to maybeRunActivator()
Changing the name as this method might change other things besides just
the database.

[MAILPOET-5564]
2023-09-07 11:02:05 +02:00
Rodrigo Primo
1f05bfb238 Move maybeDbUpdate() to its own action to run it earlier
Before this commit, maybeDbUpdate() was called inside Initializer::initialize(). This method is called using the WP `init` hook with a priority of `10`. To avoid running into situations where MailPoet code is executed before database changes are applied, we need to run maybeDbUpdate() as early as possible. To achieve this, this commit moves maybeDbUpdate() to its own action still using the `init` hook but with a priority of PHP_MIN_INT.

For more information of the potential problems of running the database changes too late check this example: pcNwfB-2V6-p2.

[MAILPOET-5564]
2023-09-07 11:02:05 +02:00
John Oleksowicz
77aef00652 Use constant instead of hardcoding option value
MAILPOET-5509
2023-08-31 14:16:10 +02:00
John Oleksowicz
5b39092cb6 Add newsletter option for filter segment id
MAILPOET-5509
2023-08-31 14:16:10 +02:00
Rostislav Wolny
68e833f80c Refactor email editor PHP and JS code to follow automations namespacing
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
5abc308f40 Highlight correct submenu item when editing email
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
c7f1ecfb5e Add EmailEditor class with basic registration of CPT for emails
The idea is that there is a core class
Mailpoet\MailPoet\EmailEditor\Core\EmailEditor which will contain common email editor related stuff
that can be used and shared between projects.
Mailpoet\MailPoet\EmailEditor\Integration\EmailEditor which contains MailPoet specific settings and and extra modifications
specific for MailPoet.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
cea9927779 Remove HS twig extension
[MAILPOET-5529]
2023-08-14 16:45:11 +02:00
Brezo Cordero
ee882b99e9 Use admin_email as default sender.
[MAILPOET-5498]
2023-08-07 13:22:53 +02:00
Jan Lysý
3a5f2624c8 Unify form template selection header with automation
I used WordPress components when it was possible and changed used block from container to content.
[MAILPOET-5376]
2023-07-31 12:28:46 +02:00
Rodrigo Primo
c72fce9aae Separate the segments and lists pages on the PHP side
Until now we were using the same render() method and Twig templates for
the segments and lists pages. This commit separates them by creating two
different render() methods, one for each page, and also separing the
Twig templates. Only the translations remain shared as separating them
would be more involved and probably not worth it.

[MAILPOET-5392]
2023-07-12 18:46:08 +02:00
Rodrigo Primo
728b8e91ac Add new menu entry to lists
Segments and lists now will have separate menu entries. The pages will
be split in subsequent commits.

[MAILPOET-5392]
2023-07-12 18:46:08 +02:00
John Oleksowicz
c9dda915dc Only create the backfill task once
MAILPOET-5404
2023-07-12 15:48:03 +02:00
John Oleksowicz
b02ef8fe8f Use populator instead of migration
MAILPOET-5404
2023-07-12 15:48:03 +02:00
John Oleksowicz
481f5585a0 Add form placement options for homepage, archives
MAILPOET-4897
2023-07-12 10:14:52 +02:00
Oluwaseun Olorunsola
4b2892ad35 Fix Redirecting to MailPoet Homepage after activating other plugins
MAILPOET-5417
2023-06-26 12:32:09 +02:00
John Oleksowicz
0e9b96d0b7 Track opens, clicks, purchases, and page views
MAILPOET-4998
2023-06-22 15:29:22 +02:00
Rodrigo Primo
e0b7bcd183 Update popup_form_dismissed_{$formId} description
[MAILPOET-5338]
2023-06-22 10:10:18 +02:00
Rodrigo Primo
bca3ac2dc9 Add popup_form_dismissed_{$formId} cookies and update section desc
[MAILPOET-5338]
2023-06-22 10:10:18 +02:00
Rodrigo Primo
6f453b68a8 Remove <br> to make it clear that the note relates to a specific cookie
[MAILPOET-5338]
2023-06-22 10:10:18 +02:00
Rodrigo Primo
5e6d1da336 Update list of cookies in the privacy policy page
[MAILPOET-5338]
2023-06-22 10:10:18 +02:00
Rodrigo Primo
acdcf29db5 Fix indentation for better readability
[MAILPOET-5338]
2023-06-22 10:10:18 +02:00
Jan Jakes
c0bdb01965 Fix passing empty callback
[MAILPOET-5383]
2023-06-16 17:14:34 +02:00
Jan Jakes
cbb1db857b Fix deprecation notice when hiding automations menu
[MAILPOET-5383]
2023-06-16 17:14:34 +02:00
Ralf Wiechers
1cd6ddd1f5 Prevent PHP notices
[MAILPOET-5383]
2023-06-16 17:14:34 +02:00
David Remer
f10ef78825 Add Analytics Page and backend logic
[MAILPOET-5088]
2023-06-15 12:25:12 +02:00
David Remer
28b38ef8f5 Add MailPoet info to WooCommerce System Status Report
[MAILPOET-4973]
2023-05-29 10:53:38 +02:00
Jan Jakes
86320563ab Highlight automations menu when email editor accessed from automations
[MAILPOET-5296]
2023-05-23 14:02:58 +02:00
Jan Jakes
2b071b6e4f Add default color to MailPoet icon to avoid flicker from black, simplify SVG
The default color is #a7aaad, when CSS is ready, it can override it.
This approach seems to be also used by Woo.

I also removed useless title and groups from the SVG.

[MAILPOET-5296]
2023-05-23 14:02:58 +02:00
Jan Jakes
af1ad22377 Remove no longer needed menu hiding logic
This is now determined by whether the parent is "null" or not.

[MAILPOET-5296]
2023-05-23 14:02:58 +02:00
Jan Jakes
dfe5a54762 Highlight main MailPoet menu for welcome wizard, landing page, Woo setup, and error page
[MAILPOET-5296]
2023-05-23 14:02:58 +02:00
Jan Jakes
2c9f72a824 Implement menu highlighting for MailPoet pages in PHP
[MAILPOET-5296]
2023-05-23 14:02:58 +02:00
Brezo Cordero
a154d2581b Fix event tracking and simplify isBundledSubscription
[MAILPOET-5223]
2023-05-22 11:52:23 +02:00