Filter hook request: inject additional styles in mailpoet email
Jules Colle
As a developer (working for Codeable among others) I’m looking for a way to inject additional CSS styles in the email messages.
Currently there seems to be no way to achieve this. I would like to suggest to add a filter hook at line 112 in mailpoet/lib/Newsletter/Renderer/Renderer.php like this:
$renderedStyles = WPFunctions::get()->applyFilters('mailpoet_rendered_styles', $this->renderStyles($styles));
This would allow developers to add some additional styling to the email messages.
Michael Bragt
Yeah thx... A simple thing as removing underline for links in my woocommerce mails seems impossible? and this is a paid thing... WOW I'm stunned
Jules Colle
I would also like to add some thoughts why I believe a good filter/hook eco-system will benefit everyone including you, your clients and professional developers.
As a professional WordPress developer I often get asked about setting up email campaigns. When my client has very basic needs, I already recommend them MailPoet, but when they ask about custom development I often have to resort to my own solution and MailPoet is not the right choice, because it's not developer friendly. The plugin is doing a great job trying to lock away and bubble wrap all the sharp edges in order to prevent users from breaking their emails. I truly get this, but I do believe you are missing out on a lot of potential with this approach.
There are a lot of companies that are hiring professional developers to set up their email system. If MailPoet would listen to the developers, and add some simple hooks, like the one proposed here, I'm sure these developers will not hesitate to urge their clients to purchase a MailPoet premium license and rest assured that they can keep extending it whenever a client asks for additional customisations down the line, resulting in a great experience for all parties.
What better advertising is there for a plugin, than a reputable WordPress professional recommending it? I might not be that reputable, but I know I would recommend the sh** out of it!