Issue with Post SMTP and Mailerlite Plugin

I ran into an issue with the Post SMTP Mailer/Email Log and the official WooCommerce – MailerLite plugin.

The error is as follows:


It seems as though both plugins include the clue\streamfilter library via composer and during a checkout will utilize the same name space and fail with the above error.

Unfortunately WordPress doesn’t handle dependencies very well. There is no core management of PHP libraries. So when multiple plugins include a dependency, a conflict can arise and a race condition occurs like the above error.

The solution? PHP Scoper is an alternative, but really isn’t idea. You can however as the plugin developer to look at utilizing this.

The other solution is that WordPress makes some core changes to help support the use of plugins utilize libraries with composer or sandboxing name spaces. You can read more here Dependency Management and WordPress: A Proposal

Hope this helps!

You May Also Like