Ultimate Member profile page download pdf link

29 November, 2023 06:17:42
todd402
Topics: 2
Messages: 5
Hi, is it possible to generate a download pdf link from an Ultimate Member profile form page where we know meta value "um_unique_account_id" and use that in place of e2pdf-download user_id value. Se we have something like [e2pdf-download id="1" dataset="5056" user_id="{um_unique_account_id}" button_title="Download Application Form"].

Many thanks
29 November, 2023 08:02:17
E2Pdf
Support
Topics: 7
Messages: 3165
Hello,

Unfortunately, by default, the shortcode with the example would not work, however, it must be possible to accomplish the task via PHP.

For example by using some Ultimate Member PHP hooks or inside PHP template:

$profile_id = um_profile_id();
echo do_shortcode('[e2pdf-download id="1" dataset="5056" user_id="' . $profile_id . '"]’);

Or you can try to create your own sub-shortcode by adding to functions.php: https://codefile.io/f/W1hvSclxhN, and use the shortcode [user_pdf_download].
We would really appreciate your feedback at WordPress.org!
29 November, 2023 08:14:01
todd402
Topics: 2
Messages: 5
You have helped me so quickly once again, and you answer work perfectly. Thanks very much