Ok perfect.
I created a new plugin with composer.json and require rospdf only.
I only require autoloader when I need it and everything works.
Thanks ??
Other thing : I made a script to import woocommerce order from another site (old) to my site. I use wc_create_order();
. Is it possible to manually assign (via code) an invoice number ?