Create button to wordpress admin panel

WordPress
20 November, 2021 15:57:12
dlalas
Topics: 1
Messages: 3
I want to create a custom button inside another plugin which will create a pdf with dynamic value it will get from a table insinde this plugin. I tried everything with your shortcodes but it doesnt work.
21 November, 2021 00:04:42
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Was you able to connect E2Pdf Template and get needed data to be able to export from "E2Pdf" -> "Export"? If yes - then you need just to correctly call shortcode with correct "dataset" as "auto dataset" like [e2pdf-download id="1"] supported only on frontend depending on connected "Item" and supported instances.

You can call shortcode dynamically via PHP as:

echo do_shortcode('[e2pdf-download id="1" dataset="'.$dataset_id.'"]');

* where $dataset_id - is the ID of Post which is under Post Type which you set as "Item" under E2Pdf Template and from which E2Pdf must be able to get data into PDF.

We remain at your service.



We would really appreciate your feedback at WordPress.org!
21 November, 2021 00:22:16
dlalas
Topics: 1
Messages: 3
I cant find this post id. Can you give me more information? Furthermore i dont want the shortcode to get data from the table. I will give it my values with args1,arg2.....
21 November, 2021 00:55:20
E2Pdf
Support
Topics: 7
Messages: 3163
You can connect E2Pdf Template just to "WordPress" -> "Pages" and use some custom Page ID in all shortcodes like:

echo do_shortcode('[e2pdf-download id="1" dataset="32" arg1="'.$arg1.'"]');

* where "32" will be correct and existing WordPress Page ID which is located under "Pages", even if you do not need to get any information from it as E2Pdf shortcodes requires the "dataset" to be set correctly in all cases.

We would really appreciate your feedback at WordPress.org!
21 November, 2021 00:58:07
E2Pdf
Support
Topics: 7
Messages: 3163
P.S. You can try to export data via "E2Pdf" -> "Export" if you have connection to custom post type where you must be able to see dynamically generated shortcodes with correct datasets.
We would really appreciate your feedback at WordPress.org!
21 November, 2021 01:01:08
dlalas
Topics: 1
Messages: 3
You are the best! Thank you! And too quick also!