Commit Graph

8 Commits

Author SHA1 Message Date
Pavel Dohnal
99963240b5 Add a code comment
[MAILPOET-3017]
2021-06-15 13:21:49 +02:00
Pavel Dohnal
ad330bff64 Gracefuly handle missing WC transactional template
[MAILPOET-3017]
2021-06-15 13:21:49 +02:00
Rostislav Wolny
a382ba8635 Prevent overriding woo settings if woo template is not set
[MAILPOET-3645]
2021-06-14 14:30:01 +02:00
Rostislav Wolny
d5f6f63ebe Use option filters instead of synchronization Woo email styles
With this change the Woo template editor will never overwrite Woo commerce settings,
but replace values of those settings using hooks.
[MAILPOET-3645]
2021-06-14 14:30:01 +02:00
Rostislav Wolny
7158f879aa Refactor fetching newsletter in TransactionalEmailHooks to doctrine
[MAILPOET-3645]
2021-06-14 14:30:01 +02:00
Rodrigo Primo
edbb69a239 Use the woocommerce_email action to customize WC emails
This commit changes the WC action that MailPoet uses to hook into WC and
customize the footer and the header of WC e-mails. Before, MailPoet was
using the woommerce_init action. The problem with using this action to customize
the e-mails is that it runs on every request. Furthermore, since we were calling
WC->mailer() inside the callback, we were instantiating WC_Emails on
every single request (WooCommerce instantiate this class only when
needed).

Replacing woocommerce_init with woocommerce_email means that our code
will run only when needed (right after WooCommerce adds callbacks to the
actions woocommerce_email_header and woocommerce_email_footer) and that
we won't be unnecessarily instantiating WC_Emails ourselves. We get the
singleton instance of this class as a parameter.

[MAILPOET-3421]
2021-03-01 14:14:19 +01:00
Jan Lysý
9e9270f13b Use email heading from Woo for email header
We want to use email heading from Woo in title of rendered email for
WooCommerce Transactional Email.

[MAILPOET-3329]
2021-01-25 11:08:00 +01:00
Pavel Dohnal
fbc6786058 Split class to prevent circular dependency
[MAILPOET-2899]
2020-05-28 11:28:51 +02:00