I am currently working on a custom Wordpress plugin. I have to use this specific folder structure:
plugins/ myplugin/ pdf.php
plugins/ myplugin/ inlude/main.js
pdf.php looks like this:
function pdfmaker() {include('/wp-content/plugins/myplugin/include/main.js');
return '<button class="w-btn us-btn-style_3 us_custom_3a3dc668" type="button" value="Print_PDF" id="MakePDF delano" onclick="make_PDF()"> Print
PDF </button>'; } add_shortcode('pdfmaker', 'pdfmaker');
but whenever i click on the button i get the error: Uncaught ReferenceError: make_PDF is not defined even when i have a function called make_PDF in my main.js file.
anyone knows how to resolve this problem