I’m writing a wordpress plugin that needs geojson-converter library (https://github.com/lraveri/geojson-converter)
I installed that but it seems not to be loaded correctly, so I receive this error
Class ‘KmlConverter’ not found in …
I simply required the autoload in my php file.
require_once( plugin_dir_path( __FILE__ ) . 'vendor/autoload.php' );
the path is correct, of course!
Inspecting the folder structure I noticed that there are different levels.
vendor
-composer
-- <composer autoload files>
-lraveri
-- geojson-converter
--- src
---- KmlConverter.php
---- <other stuff>
--- vendor
---- composer
---- autoload.php
autoload.php
As you can see, the class KmlConverter exists, but it’s not loaded properly.
I do not user composer so often, so I cannon figure out what’s wrong.
Any suggestion?
Thank you everybody!