We are using a plugin on our website that is sending an email to the users after their project is approved. When I include the code [e2pdf-download id="4" dataset="11578" ] in an article the download link is generated.
How can I dynamically generate a link to be included in the email so the users when they click on it the pdf to be generated ?
An example where the code is working: https://mooncampchallenge.org/certificate/
13 November, 2019 14:38:36
E2Pdf
Support
Topics: 7
Messages: 3573
Hi,
Do you need to use dynamic dataset inside email? If so unfortunately Dynamic Datasets doesn't supported in emails for WordPress extension, as this value connected to Post ID where shortcode placed.
The only way is to use hooks for plugin that you are using via PHP and update mail body:
Unfortunately the solution provided it doesn't work. The plugin is not executed before sending the mail so there is no generated link.
How can I generate a link that is dynamically building the pdf and send the arguments via the link ?
Kind regards,
Adrian
15 November, 2019 15:41:49
E2Pdf
Support
Topics: 7
Messages: 3573
Hi, we checked AdForest theme, unfortunately it doesn't allow simple hooks to update mail body but you can overwrite standard action to send emails on approval.
We have prepared code example, it must be inserted to functions.php of your theme.
After adding code, you can insert to "Ad Activation Email": %e2pdf_download%
It will be converted to PDF download link for current Ad Posted ID with updated function.
P.S. Keep in mind please that if you are not using child theme, changes that you made to your functions.php of main theme can be truncated after theme update.
We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according our to our Cookie Policy.