automatic PDF invoice with FPDF in PHP (creating Plugin)
You need to load WordPress before using wp functions, use this just after the <?php tag: require( ‘<<DIR>>/wp-load.php’ ); where <<DIR>> is the path to the main wordpress folder (in your case something like ../../../, add double dots as needed to navigate up the plugins and wp-content hierarchy NOTE: direct linking outside you control zone … Read more