Hi,
I encountered a conflict issue between the Formidable PDFs plugin and the SupportCandy plugin on my WordPress site.
When both plugins are activated, I receive the following fatal error:
Fatal error: Cannot declare class ComposerAutoloaderInita93271dd13b797bc42be7fa85eb30ecb, because the name is already in use in /home/.../wp-content/plugins/formidable-pdfs/classes/lib/dompdf/vendor/composer/autoload_real.php on line 5
Background:
The Formidable PDFs plugin uses a local bundled version of dompdf, which includes its own Composer autoloader (autoload_real.php).
The SupportCandy plugin also utilizes a local copy of dompdf (and optionally TCPDF) and similarly loads a Composer autoloader.
Since Composer generates a ComposerAutoloaderInit{hash} class name automatically, and both plugins include their own copy, the class name conflicts.
As a result, whichever plugin loads its autoload_real.php first will block the other and cause a fatal error.
Tested Scenarios:
Deactivating Formidable PDFs resolves the error, but I lose the ability to generate PDFs with Formidable Forms.
Switching SupportCandy to use TCPDF avoids using dompdf, but SupportCandy's "Print" functionality stops working properly.
When only one plugin is active, both work individually without issues.
Expected Behavior:
I would like to have both plugins activated at the same time, using their PDF generation features independently, without fatal errors.
Question:
Is there a recommended way to prevent this autoloader conflict?
Could future versions of Formidable PDFs implement a safer loading mechanism for dompdf?
Or is there any workaround you suggest for now without heavily modifying the plugin?
Thanks in advance!