Plugin autoload conflict with WooCommerce
Question
I building my plugin in OOP but I have a conflict with WooCommerce.
The error response require(): Failed opening required ‘Automattic/WooCommerce/Container.php’
I use the spl_autoload_register function from PHP
<?php
spl_autoload_register( function( $classname ) {
require str_replace( '', '/', $classname).'.php';
} );
?>
Is there a solution to fix this issue so I can use autoloader?
0
3 months
2020-12-28T11:10:43-05:00
2020-12-28T11:10:43-05:00 0 Answers
3 views
0
Leave an answer