The complete stacktrace is:
Fatal error: Uncaught Error: Call to undefined method WPDM\Package::validateMasterKey() in [...]/wp-content/plugins/wpdm-premium-packages/wpdm-premium-packages.php:448 Stack trace: #0 [...]/wp-content/plugins/wpdm-premium-packages/includes/libs/functions.php(740): WPDMPP\WPDMPremiumPackage::authorize_masterkey() #1 [...]/wp-includes/class-wp-hook.php(286): wpdmpp_validate_download(Array) #2 [...]/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(Array, Array) #3 [...]/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 [...]/wp-content/plugins/download-manager/wpdm-start-download.php(5): do_action('wpdm_onstart_do...', Array) #5 [...]/wp-content/plugins/download-manager/libs/class.Apply.php(555): include('[...]...') #6 [...]/wp-includes/class-wp-hook.php(286): WPDM\libs\Apply->triggerDownload('') #7 [...]/wp-inc in [...]/wp-content/plugins/wpdm-premium-packages/wpdm-premium-packages.php on line 448
Note – I’ve replaced /home/*USER*/*DIR*
with [...]
Thanks!
Could you tell me what I had wrong?
Thank you, perfect.
The top of the pop-up login form (and the download completion popup) are covered by my responsive template’s sticky menu. Can I add margin at the top of this form to bump it down the screen? What is the class in CSS that would achieve this?
Thanks so much! Five stars!
I’m now implementing this same form on an updated theme for the same site. When the “Download” link is clicked, the window dims momentarily to the transparent overlay gray, and the popup form blinks once at the top of the screen. But then the overlay goes away, and no popup is presented. I had to be very quick to get this screen capture, it’s less than a 10th of a second on the screen.
It’s acting like a theme animation conflict, I think.
The problem still exists.
That is there. I think you added it at some point in the past for another issue.
Well, this dropped to page 2 with no response so I think I will bump it.
Anything?
Thanks,
Richard
Now the only thing left is how to make the fields required which should be coming on Feb. 15th apparently…..
Ok, thank you.
I got this:
Array
(
[id] ► 2468
[dataType] ► json
[execute] ► wpdm_getlink
[verify] ► email
[action] ► wpdm_ajax_call
[custom_form_field] ► Array
(
[name] ► richard
[fredid] ► 22
[company] ► company1234
[ph] ► 0987654321
)
[s2dcf_meta_box_nonce] ► 3f49a3cef5
[_wp_http_referer] ► /fredreleasedownloadlinkstest/
[email] ► <email address entered in form>
)
It appears that it is an array, within an array.
For the people watching and any who want to do this, this is what you have to do.
Because it’s a nested array you have to parse the sub-array into another variable like so:
$customform = $post[custom_form_field]
where $customform is the variable and you can address the various fields like $post (eg. $customform[company]
)
I also solved the newline issue in the resultant email that is generated.
Because the email type is set to html, \r\n will not work for formatting. you have to use <br> in place of \r\n anytime you want a new line.
My code no looks like this (sorry about the formatting):
add_action(“wpdm_before_email_download_link”, “your_function”, 10, 2);
function your_function($post, $file){
customform = $post[custom_form_field];
$message = “Package Title: {$file[post_title]}<br>
Email: {$post[email]}<br>
Name: {$customform[name]}<br>
Fred Key # {$customform[fredid]}<br>
Company: {$customform[company]}<br>
Phone: {$customform[ph]}<br>
end of line”;
wp_mail(“email1@company.com”, “New Download Notification”, $message, “From: no-reply@sitename\r\nContent-type: text/html\r\n”);
}
This code in the functions.php for your theme will generate an additional email to email1@company.com with the following content
Package Title: <package title>
Email: <email address entered in form>
Name: richard
Fred Key # 5
company: Success Inc.
Phone: 1234567890
end of line
this has been an ….. interesting …… experience
Care to detail that? I got that firebug is a firefox plugin…
I tried to change around some of the script to no avail.
That would be because I pulled the code to prevent the error. I put it back in, hopefully there is no other side effects.
I will also note that using print_r() did not display the $post data.
I changed the code as follows:
function your_function($post, $file){
$fredid = print_r($post);
$message = “Package Title: {$file[‘post_title’]}
Email: {$post[’email’]}
Name: {$post[‘name’]}
Fred Key # {$fredid}”;
wp_mail(……………………………..
When I fill out the download form, it now says Processing…. and then “undefined”
and the result of the secondary email is:
“Package Title: FRED 7.100 Email: <email address> Name: Fred Key # 1 ”
Thank you for info about the update. also note I updated to WPDM Custom Fields 1.4.2.
How do I parse out the custom field data?
I have a custom field with a field name of fredid and a field type of number.
I tried (as you saw)
$post[fredid]
to output the data and nothing comes out. is there a prefix or something I have to use to get the custom field data?
I will also note that \r\n is not generating a newline but I am not sure that it is related.
When are the updates you mentioned coming (email customization/custom fields update)?
I get a parse error on this line:
$message = “Package Title: {$file[‘post_title’]}