When I try and print the token in either a message or email the token is blank.
[webform_submission:protected_download_url]
The culprit seems to be around $replacements[$original] = $link; on line 93 of webform_protected_downloads.module.
If before that I do die(kint($link)); I get the correct value.
I do die(kint($replacements[$original])); after the $replacements[$original] = $link; I also get the correct value. But I soon as I do die(kint($replacements)); after the origional if of if (isset($tokens['protected_download_url']) && isset($data['entity'])) { the array is blank.
When I try and print the token in either a message or email the token is blank.
[webform_submission:protected_download_url]
The culprit seems to be around
$replacements[$original] = $link;
on line93
ofwebform_protected_downloads.module
.If before that I do
die(kint($link));
I get the correct value.I do
die(kint($replacements[$original]));
after the$replacements[$original] = $link;
I also get the correct value. But I soon as I dodie(kint($replacements));
after the origional if ofif (isset($tokens['protected_download_url']) && isset($data['entity'])) {
the array is blank.Hope this helps.