- Reorganize field files into directories
- Extract woo fields/validation to match how subscriber fields work
- Fix typo in a file name
- Create new FilterProps type instead of repeating it all over the place
MAILPOET-5227
We need to make sure that the global _ is always underscore
In certain themes Lodash's global _ is overriding the Underscore.js global of the same name, so while this segment of code was written targeting Underscore, it's in-fact using Lodash:
6e7053a6df/src/wp-includes/js/media/views/frame.js\#L76-L78
Unlike Underscore.js's each method, Lodash's equivalent does not support the third context argument. Since the above code is dependent upon the context being provided for this to be bound correctly in the call to this.activeMode, it otherwise fails.
Fixes: #4708
[MAILPOET-5380]
There was a bug in the query that is used to get the subscribers that
opened emails that was preventing it from working when trying to get
subscribers that opened zero emails.
The problem was that we were adding the user_agent_type as a condition
on the WHERE part of the clause. Meaning that it was being used to
filter the overall results and thus excluding all subscribers that had
no entries in the wp_mailpoet_statistics_opens table. By moving this
condition to the ON clause in the LEFT JOIN, we use the user_agent_type
field to match rows between tables. The value of this field will still
be taken into consideration when counting the number of opens as we are
counting the number of entries in the wp_mailpoet_statistics_opens
table.
[MAILPOET-5347]
This commit changes the behavior of the country segment to include
subscribers that never placed an order (or placed orders that failed or
were canceled) as long as they have a country set in the WooCommerce
customer lookup table.
[MAILPOET-4188]