Commit Graph

20446 Commits

Author SHA1 Message Date
John Oleksowicz
003a28e444 Add Create new segment link to filter segment
A note on using context: we need to be able to save the draft of the
newsletter before redirecting users to the segment creation page,
otherwise they might unexpectedly lose their work. The link exists in
a field, so the alternative to using a context seemed to be passing this
 function down as a prop, first to the Form and then to all of the
 fields, whether they needed it or not. This seemed clunky at best, and
 require changes to Form and Fields that get used many other places in
 the plugin.

 Using a context was the cleanest solution I could come up with for
 avoiding those changes.

MAILPOET-5512
2023-10-16 10:22:22 +02:00
David Remer
8fbac3e2c2 Release 4.31.1 2023-10-13 18:09:52 +03:00
Jan Jakes
e9833006ad Fix media library being empty in some cases
[MAILPOET-5656]
2023-10-13 18:09:52 +03:00
John Oleksowicz
43107ac823 Add note about filters to SubscriberTag
MAILPOET-5632
2023-10-13 11:21:42 +02:00
John Oleksowicz
bbb1a133fb Don't allow saving of lookup data to throw unhandled errors
It's not a critical error if we aren't able to save this lookup data,
and we wouldn't want it to interfere with the sending of a newsletter,
but we should log it as an error for debugging purposes.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
9b7296979e Don't attempt to use WC functions if not enabled
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
b1dd110bf8 Add lookup data retrieval for used shipping method
For ease of lookup, I changed the helper to return an array with keys
corresponding to the instanceId of the shipping methods. I couldn't see
anywhere else in the codebase where the keys would have mattered.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
97a53cb1aa Add lookup data retrieval for used payment method
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
c4fc8649f4 Add lookup data retrieval for used coupon code
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
67cff8992e Add lookup data retrieval for woo product
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
9d8fb08026 Add lookup data retrieval for woo category
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
54461d89ba Add lookup data retrieval for wordpress user role
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
d1f77d3ee5 Add lookup data retrieval for subscribed to list
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
af9a6cbb67 Add lookup data retrieval for subscribed via form
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
40785d047e Add lookup data retrieval for custom fields
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
6da760e754 Add lookup data filter to subscriber tag
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
beda4f8d89 Add lookup data retrieval for email filters
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
984aa81f86 Add lookup data retrieval for automation filters
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
cce390688c Add convenience methods for param retrieval
MAILPOET-5625
2023-10-13 11:21:42 +02:00
John Oleksowicz
12362c0399 Update filter interface for lookup data
This method is intended to store the actual names of things that might
change or be deleted in the future, so we can include accurate
information when showing what the snapshot of the filter was at the time
.

MAILPOET-5625
2023-10-13 11:21:42 +02:00
Jan Lysý
eace314009 Use wpLocalizeScript instead of wpAddInlineScript in Email editor
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
bc5d0cb203 Use createInterpolateElement instead of ReactStringReplace in send-preview-email
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
5fce014a60 Fix email dataSchema in EmailApiController
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
5b21b74794 Add acceptance test for sending preview
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
2b58bbd7b1 Add displaying error and success message
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
e5e04e63e2 Add sending email after click on button
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
98542966aa Introduce MailPoet store
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
de66b3fea1 Add JS variables for email editor
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
226317f55c Fix creating newsletter in EmailEditor
After removing temporary fix a hash was missing for newsletter created via EmailEditor.php
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
8ede5958b7 Add modal window with input for sending testing email
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
b1eb5ccb96 Add preview dropdown component to new email editor
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
65b6a129ae Add email preview URL to EmailApiController response
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
ea4f4b1003 Remove temporary fix for Newsletters
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
ed0417b819 Rename component NextButtonSlot to HeaderButtonSlot
I renamed this component because the name should be more universal for using other buttons.
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
David Remer
17ca776189 Ensure that woocommerce is actually active
[MAILPOTE-5613]
2023-10-11 10:19:24 +02:00
Rodrigo Primo
cde2d6570b Fix displaying default condition when adding a segment
Whenever the user goes to add a new segment, MP displays `WordPress user
role` as the default condition. But there was a
bug that was preventing the default condition from being displayed, if
the user left the page by clicking in the back button, and then returned
clicking again on the `Create custom segment` button.

This bug was introduced in dba4ba4dfc.
It added code to unset the segment when the user left the segment
editing page. This was necessary as, in that PR, we started using the
same store for all the dynamic segment pages. The problem is that the
added code sets the segment to an empty array and actually we need to
restore the initial state which is a segment with the `WordPress user
role` selected as its single filter. This is what is done in this commit.

[MAILPOET-5614]
2023-10-10 17:55:21 +02:00
David Remer
1ced9b69f6 Release 4.31.0 2023-10-10 14:13:29 +03:00
David Remer
d2d465165d Remove double log entries before adding unique index
[MAILPOET-5630]
2023-10-09 13:20:20 +02:00
Pavel Dohnal
f5a9e6d582 Add tracking of .com ecommerce wpcom plan
[MAILPOET-5628]
2023-10-09 13:00:43 +02:00
Pavel Dohnal
0e4e5db1f1 Add tracking of .com ecommerce wpcom plan
[MAILPOET-5628]
2023-10-09 13:00:43 +02:00
Pavel Dohnal
ee199e95a8 Add tracking of .com ecommerce trial plan
[MAILPOET-5628]
2023-10-09 13:00:43 +02:00
Pavel Dohnal
e2d1543b47 Add tracking of .com business plan
[MAILPOET-5628]
2023-10-09 13:00:43 +02:00
Pavel Dohnal
9852148e33 Add tracking of .com essential plan
[MAILPOET-5628]
2023-10-09 13:00:43 +02:00
Pavel Dohnal
7143d7afb2 Add tracking of WooCommerce performance plan
[MAILPOET-5628]
2023-10-09 13:00:43 +02:00
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
ca40766c2f Allow null for WP_Block_Editor_Context in email editor callbacks
There are cases when the second parameter is null.
[MAILPOET-5624]
2023-10-09 11:33:11 +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
David Remer
ee892a667a use kebab case
[MAILPOET-5515]
2023-10-09 10:06:56 +02:00
David Remer
a1e59d5f31 Fix bug: Ensure data['tags'] is normalized
[MAILPOET-5515]
2023-10-09 10:06:56 +02:00