Commit Graph

143 Commits

Author SHA1 Message Date
Sam Najian
c9c75c8c6d Add admin.js to all admin pages using AssetController
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
Sam Najian
0a11fadb05 Enqueue newletter assest using asset controller
[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
Sam Najian
ece4977d6a Add newsletter_editor.js using AssetsController
newsletter_editor.js was added via newsletter/editor.html
it's now removed from the template and wpEnqueueScript is
user instead

[MAILPOET-4908]
2023-03-20 11:49:27 +01:00
Rostislav Wolny
d832925107 Remove temporary static property for the plugin main page
The property was added so that we were able to set the main page
dynamically based on the feature switch value. This is no longer needed and
we can use the hardcoded constant as we did before.
[MAILPOET-4831]
2023-03-13 14:09:17 +01:00
Sam Najian
534bff5a80 Show a notice on top of newsletter listing for corrupt emails
[MAILPOET-4983]
2023-03-01 17:46:22 +01:00
David Remer
7210fad0e1 Add subject_keys to Step definition
[MAILPOET-4966]
2023-03-01 16:14:38 +01:00
Jan Lysý
7b93f0e61e Move products selections to React component
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
Jan Lysý
d25e6cf4ff Use React for coupon general settings
[MAILPOET-4890]
2023-02-22 13:07:40 +01:00
Rodrigo Primo
1de328abaa Use settings store instead of local component state for sender data
In [MAILPOET-4818], we started using the settings Redux store to handle
adding the MSS key in the last step of the Welcome Wizard. This
introduced a bug in the previous steps as the same Redux store is not
used. Those steps rely on the component state to track changes to their
fields. This meant that once the user completed the last step, the
changes made in the previous steps were ignored and the default values
for the settings was saved to the database.

This commit fixes this bug for the first step of the wizard by using the
same settings Redux store to track changes to the sender name and
address.

[MAILPOET-5059]
2023-02-14 12:46:04 +01:00
Rodrigo Primo
dd2f100acd Implement MSS key verification in the MSS step of the welcome wizard
[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
Rodrigo Primo
359f734024 Implement confirmation modal for setting up custom sending service
This commit implements the confirmation modal that is displayed when the
user clicks on the "I’ll set up my own email service" link in the MSS
step of the welcome wizard.

[MAILPOET-4818]
2023-02-08 12:56:32 +01:00
Rodrigo Primo
8a4f5c13da Add tracking for users arriving to the wizard from WooCommerce
MailPoet adds a link to the WooCommerce task list pointing to its own
welcome wizard. We want to track users that arrive to the MP wizard from
WooCommerce but at this point tracking is not enabled. So we store the
information in a setting, and send the tracking event to Mixpanel, if it
is enabled, after the user completes the wizard.

[MAILPOET-4814]
2023-01-30 15:01:42 +01:00
Oluwaseun Olorunsola
494723c818 Use WooCommerce decimal separators when validating input fields
We need to use the decimal separators selected by the user for our validation. We are also using the validation used on the adding/editing coupon page

MAILPOET-4762
2023-01-30 11:48:48 +01:00
Jan Lysý
f88623e48d Add settings code and resetting placeholder
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
Jan Lysý
46fdd8eeb3 Add select with existing coupons
[MAILPOET-4761]
2023-01-30 09:36:21 +01:00
Jan Jakes
3dbd91bfef Add Intl.Locale detection for formatting localized strings
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
Jan Jakes
e3e865eac5 Use plugin context to load list of segments
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
Jan Jakes
6b7ffbc4ad Allow plugins to add their own context data for automation editor
[PREMIUM-215]
2023-01-26 14:12:22 +01:00
Jan Jakes
4ddcc14eee Rename context to registry
This will align better with the backend naming as well as free up "context" for other purposes.

[PREMIUM-215]
2023-01-26 14:12:22 +01:00
Rostislav Wolny
5fe02fcc3e Refactor homepage data fetching to a new service
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
Rostislav Wolny
722e6f9d27 Add functionality for hiding the product discovery section
[MAILPOET-4827]
2023-01-23 16:48:52 +01:00
Sam Najian
d963bb4e7d Update coupon setting view styling
Adds percentage sign when the discount type is of percentage
type, adjusts the width and view of coupon amount field

[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
Sam Najian
14c85e3380 Pass Coupon code placeholder from PHP and unify
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
Sam Najian
199910a52f Add coupon block config
[MAILPOET-4678]
2023-01-23 13:31:34 +01:00
Rostislav Wolny
38640e65e4 Add complete state task titles and additional task contents
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
Rostislav Wolny
24d3c0b13b Display WooCommerce import task based on customers count
We use the same logic in WooCommerce setup page
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
Rostislav Wolny
5f0ac0ec7e Render simple task list items with state info
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
Rostislav Wolny
8c767af5c6 Store homepage task list was dismissed to DB
[MAILPOET-4826]
2023-01-11 11:30:10 +01:00
Oluwaseun Olorunsola
974d2d5a59 Add welcome_wizard_url variable
MAILPOET-4797
2023-01-09 14:38:09 +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
05202d572f Add Mailer Error notice to homepage
This commit reuses the MailerError component to render important errors related to issues in sending.

I needed to slightly modify the MailerError notice component to be able to render as inline notice.
When rendered as non-inline WordPress JS code grabbed it and moved in DOM breaking all callbacks.
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
Rostislav Wolny
1efc417f82 Add TransactionalEmailsProposeOptInNotice on homepage
[MAILPOET-4825]
2023-01-02 14:13:53 +01:00
David Remer
1fcdccaa33 Expost json api endpoint
[PREMIUM-213]
2022-12-16 14:11:34 +01:00
David Remer
92996ac781 Make mailpoet_tags available globally
[MAILPOET-4423]
2022-12-16 14:11:34 +01:00
Oluwaseun Olorunsola
669367c9c6 Update texts and fix editor saving template with missing activation link
MAILPOET-4649
2022-12-15 18:15:01 +01:00
Oluwaseun Olorunsola
856e0f69d3 Add text contents and data required for confirmation email editor
MAILPOET-4649
2022-12-15 18:15:01 +01:00
Rostislav Wolny
172b5215d2 Fix strict types definition spacing
[MAILPOET-4879]
2022-11-30 12:39:19 +01:00
Rostislav Wolny
a8bceffc9c Add forgotten strict_types to Homepage page class
[MAILPOET-4824]
2022-11-30 11:42:41 +01:00
Rostislav Wolny
8d974d8147 Add mainPageSlug to MailPoet module
In some places we hardcode emails page as the main page.
This property is meant to be used in places where we want to link
to main plugin page so that the links change when homepage 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
f369e399ed Distinguish main page and emails page
There are some cases where we link or redirect to main page but
actually we want to redirect to emails page. It happens that currently they are
the same page, but we need to distinguish these cases for the future when
we switch the main page to new homepage.
[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
c67c58709b Unify spacing of declare statements
[MAILPOET-2688]
2022-11-29 15:04:09 +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
2e328b6d7f Move temporary automation migrator to a new migration
[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
Jan Jakes
dc5e5b4f8b Use "automation" instead of "workflow" in user-facing strings
[MAILPOET-4758]
2022-11-04 10:51:23 +02:00
David Remer
736d8a8b12 Add 'Give feedback' beacon ID to automation pages
[MAILPOET-4755]
2022-11-04 06:26:21 +02:00
David Remer
945ff65358 Use cdn url for automation assets
[MAILPOET-4536]
2022-11-03 11:56:21 +01:00