Easy Digital Downloads Purchase Link not working

I am using Easy Digital Downloads plugin to sell some digital products. However, I am facing an issue when I use the Purchase Link on ajax. If I use ajax filter and filter the products then the Purchase Link throws an error:

Uncaught TypeError: Cannot read property 'total' of null     at Object.success (edd-ajax.js?ver=2.9.16:229)     at i (jquery.js?ver=1.12.4-wp:2)     at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)     at x (jquery.js?ver=1.12.4-wp:4)     at XMLHttpRequest.c (jquery.js?ver=1.12.4-wp:4) 

However, the Purchase Link works fine on page load but is throwing the above error after I filter the products. There is nonce value when I inspect the purchase button but when I try to alert or console it, the value is returned blank and hence nonce check fails. This leads to the above error – http://prntscr.com/qcvbm8

This is the code for purchase link –

echo edd_get_purchase_link( array( 'download_id' => 1111 ) ); 

Any help would be more than appreciable.

405 returned for specific php file, downloads when browsing [on hold]

I’ve inherited a Nginx driven site, the problem is that when browsing to a specific php file it initiates a download, but the index.php on the site gets executed.

The php file handles a return POST request from a payment gateway and is throwing a 405 when it’s called.

Happy to post my conf, but it’s 830 lines long and I dont know which lines are relevant.

How to exclude downloads using edd_store_discount function for easy digital downloads plugin

I’m setting up custom discount code generator via API and I got everything working except one thing. I got no idea how to exclude certain products/downloads using edd_store_discount function. WordPress and EDD plugin are up to date and I’m using 7.3.8 php version. Just in case you need that info.

My biggest problem is I’m not quite sure whats the field name and how the IDs should be saved for excluded downloads field. I googled as much as I could but there were no solutions. Most of the code was c/p from a guide I found but it has no mention of excluding products either.

add_filter("wcra_zapier_callback" , "wcra_zapier_callback_handler");             function wcra_zapier_callback_handler($  param){    $  sendemail = $  param['email']; //Grab email from post request $  email = sanitize_email( urldecode( $  sendemail ) ); //sanitize it just in case $  parts = explode('@', $  email); //split the email $  email = $  parts[0]; //use only first part of email, before @ $  email = preg_replace("/[^A-Za-z0-9 ]/", '', $  email); //leave only alpha-numeric characters      //Create random discount code     function generateRandomString($  length = 5) {     return substr(str_shuffle(str_repeat($  x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($  length/strlen($  x)) )),1,$  length);     }     $  rcode = generateRandomString();     $  code = $  email."-".$  rcode;     //Set expiration time -- 604800 == week in seconds     $  expires = time() + ( 1 * 604800 );     //create code and get it's ID     $  details = array(         'code'              => $  code,         'name'              => $  email,         'status'            => 'active',         'is_single_use'     => 1,     //  'excluded-products[]' => array(23756,23705),  This is the one thats bothering me, I tried switching up names and values but had no luck         'amount'            => '100',         'expiration'        => date( 'm/d/Y H:i:s', $  expires ),         'type'              => 'percent',         'max' => 1,         'uses' => 0     );     $  id = edd_store_discount( $  details, null );       //Check for error     if( ! is_numeric( $  id ) ){         wp_send_json_error( ['error' => 'Failed to create discount' ] );     }     //get discount code     $  discount_code = edd_get_discount_code( $  id );  //Send emai //user posted variables    $  ademail = get_option('admin_email');   $  message = "Hello, your special discount code is: \"".$  discount_code."\"\r\n";  //php mailer variables   $  to = $  sendemail;   $  subject = "Discount code you requested";   $  headers = 'From: '. $  ademail . "\r\n" .     'Reply-To: ' . $  ademail . "\r\n";   //Here put your Validation and send mail $  sent = wp_mail($  to, $  subject, strip_tags($  message), $  headers);       if($  sent) {         $  mailstatus = "sent";       }//message sent!       else  {         $  mailstatus = "failed";       }//message wasn't sent     return $  discount_code;   }    

I wish to define a static list of 6 products/downloads that will be excluded from this discount code.Exactly like its possible from admin dashboard https://puu.sh/E7H1D.png (can’t embed cause of my low rep)

Record of file downloads

I’m a system administrator and I’ve been asked whether it is possible to keep a record of file downloads (both successful and unsuccessful ones) by users (yes, of files they already have access to via a terminal). None of these users have administrator access.

If such information is available by default, that would be great, but if there is a program I can install which could create such a record for me, that would be fine as well.

Personally, I think there wouldn’t be a “foolproof” way of doing this as long as users have terminal access. But I could be wrong, which is why I thought I’d ask.

What’s the standard way to show downloading notification to user for file downloads that require authorization in web applications?

Our web application needs to enable secured file download by requiring HTTP requests to have authorization token.

Due to this, when user clicks download the file will be retrieved using AJAX GET request with the access token. Once the file is in memory, it will be saved to user’s hard drive using temporary link pointing to file’s data in memory.

Because of this approach, browser doesn’t show download progress immediately like in normal file download (in the bottom bar in Chrome). We need a way to tell user that something is going on as it may take some time to retrieve the file data.

We are thinking of showing a toast message and dismiss it when done. I haven’t seen many examples of this on the net in many websites.

What is the standard way (if there is any) to do this?

App downloads big data again on every start

I have changed many of the permissions (especially by Play Store and Play Store Services). Now many apps works unusual and many doesn’t work but doesn’t give any understandable error.

One of them is a game “World of Tanks Blitz”. Whenever I open the app, it asks for Google account login and then it starts to download the big data like GBs for every tank.

How can I fix or at least how can I understand the problem exactly?