Commit Graph

20858 Commits

Author SHA1 Message Date
Rodrigo Primo
8448bc67f9 Use WP functions instead of MP functions for i18n in form.tsx
[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Rodrigo Primo
a116066e06 Update design of the header of the segment edit page
Parts of this design was already implemented on the segment template
page. The CSS was moved to a common placed and reused in both pages.

[MAILPOET-5398]
2023-10-05 10:32:18 +02:00
Jan Jakes
435350254c Update readme with current information about i18n usage
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
9e825d9157 Keep entrypoint asset name as script name, remove unnecessary check
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
0411ed2c37 Enqueue Parsley translation strings in after "admin_vendor"
This is a better place and it corresponds to the current logic.

[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
16c51717b7 Fix timing of "mailpoet_scripts_admin_before" actioon trigger
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
113d710eb4 Call "mailpoet_styles_admin_after" from page renderer
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
ab6beb3c21 Fix issue with loadash overriding underscore on window._
Fixes: TypeError: this.activateMode is not a function
See also: https://github.com/mailpoet/mailpoet/pull/4977/files

[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
bb801597af Remove Twig CSS asset macro
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
68b585c544 Remove "after_css" block
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
312f85efdd Enqueue all styles using WP native functions
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
470d8f1aea Remove Twig JS asset macro
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
dae575888a Inline analytics JS
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
420a9c41e0 Use WP logic to enqueue Parsley validation strings
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
ed76bbf3d6 Invoke "mailpoet_scripts_admin_before" from the asset controller
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
2a676353aa Render "after_javascript" block after other scripts
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
3106b19684 Remove translation blocks ("localize" now enqueues scrips directly)
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
54ebd5855a Enqueue inline translations from Twig templates after mailpoet.js
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
282f7b8414 Enqueue all admin scripts using WP native functions
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
Jan Jakes
480d9f1239 Extract admin pages assets setup out of form assets controller
[MAILPOET-5118]
2023-10-04 15:05:38 +02:00
John Oleksowicz
fe58ed5c55 Convert to kebab case
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
b488691b47 Disable filter segment if subscriber limit reached
This also consolidates a couple of places where we are checking premium
status. One side effect is that the Google Analytics field will now also
 be disabled if the subscriber limit has been reached, which I believe
 is the desired behavior.

MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
df27277ed6 Fix react warning with date field values
This isn't specific to this ticket but I noticed it while testing. React
 is throwing a warning about the input switching from uncontrolled to
 controlled after entering a value for an "in the last" or "not in the
 last" date field. This is because segment.value is undefined at first.
 Setting the default to an empty string instead prevents the issue.

MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
36c2b7a82b Update styles for filter segment
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
1858a38889 Disable filter segment if premium inactive
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
f5b3d1123d Allow boolean or callback for disabled prop
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
d389a1d574 Replace existing send to fields with extracted version
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
6867190677 Extract send to fields and include filter segment
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
4bc6660eec Create recipient count component
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
7b57db7385 Create filter segment component
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
087e776745 Update and fix types
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
673a1ab0fd Ensure correct parameter types
It's not enough to just merge the parameters. Without merging types as
well, array parameters aren't handled correctly.

MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
a2d04e93c5 Add endpoint to retrieve count for multiple segments
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
6b2b35b541 Add ability to get count filtered by segment
MAILPOET-5510
2023-10-04 12:59:38 +02:00
John Oleksowicz
fd1c476901 Update labels
MAILPOET-5510
2023-10-04 12:59:38 +02:00
David Remer
fc5a2c4168 Use kebab-case
[MAILPOET-5212]
2023-10-03 19:14:30 +02:00
David Remer
91e2ecded1 Report unique custom trigger and action hooks
[MAILPOET-5212]
2023-10-03 19:14:30 +02:00
David Remer
b92d026042 Improve wording of trigger description
[MAILPOET-5212]
2023-10-03 19:14:30 +02:00
David Remer
b9ecac91d4 Query all runs when no status has been added
[MAILPOET-5514]
2023-10-03 19:14:30 +02:00
David Remer
976ea06ebc Add custom trigger and action hooks to reporter
[MAILPOET-5514]
2023-10-03 19:14:30 +02:00
David Remer
87206aa899 Expose WordPress Notices
[MAILPOET-5514]
2023-10-03 19:14:30 +02:00
David Remer
6ef3435a80 Remove segment as a required subject
If a segment is given, the subscriber needs to be subscribed to it, otherwise
the subscriber only needs to be globally subscribed

[MAILPOET-5514]
2023-10-03 19:14:30 +02:00
David Remer
fa5c12e584 Add Custom Trigger and Custom Action stubs
[MAILPOET-5514]
2023-10-03 19:14:30 +02:00
John Oleksowicz
b2604e11ee Convert to kebab case
MAILPOET-5511
2023-10-03 13:09:11 +02:00
John Oleksowicz
bac83fe47c Ensure gap exists between sibling mailpoet-tags containers
MAILPOET-5511
2023-10-03 13:09:11 +02:00
John Oleksowicz
cdb9898dc8 Display filter segment in listings/stats
MAILPOET-5511
2023-10-03 13:09:11 +02:00
John Oleksowicz
c0c578ee05 Only show detailed stats if premium active
Without this check, if premium is present but not active, attempting to
view the stats page for a newsletter results in an "Invalid API
endpoint" error because it tries to retrieve detailed stats from a
premium endpoint.

MAILPOET-5511
2023-10-03 13:09:11 +02:00
John Oleksowicz
b19d067aa0 Make newsletters inherit filter segment ID
MAILPOET-5511
2023-10-03 13:09:11 +02:00
Rostislav Wolny
20983307e3 Release 4.30.0 2023-10-03 12:15:06 +02:00
Rostislav Wolny
eb12069122 Ensure the integer is returned when we call paginated wc_get_orders
In Woo 8.2.0-beta.1, the total value was null. In this commit I want to
make sure we always return an integer.
[MAILPOET-5621]
2023-10-03 10:00:56 +02:00