WPDB PDF Stamper Plug In 1.4.0
3/20/2015
Bug: Wasn’t putting watermark on individual file downloads, only on package downloads. To fix this bug I changed the wpdm-pdf-stampers.php file on line 120 from
isset($_GET[‘ind’])?$_GET[‘ind’]:0;
To
$ind = 0; //isset($_GET[‘ind’])?$_GET[‘ind’]:0;
Then at the bottom of the fileProcess method I added stats counting, which it does not do on file download when the change above was made:
//wpdm_download_file($filepath, $filename, $speed, 1, $package);
global $current_user;
get_currentuserinfo();
$log = new Stats();
$oid = isset($_GET[‘oid’]) ? esc_attr($_GET[‘oid’]) : ”;
$indsc = 1;
$indsc = isset($_GET[‘ind’]) && get_option(‘__wpdm_ind_stats’) == 0 ? 0 : 1;
if ($indsc && !isset($_GET[‘nostat’]))
$log->NewStat($package[‘ID’], $current_user->ID, $oid);
//process filepath to create new file
$this->processPDF($filepath,$filename,$package[‘ID’]);
Obviously all of this gets wiped out when I update the stamper plugin. I’ve added this to my change log notes so that I can add this back in if this bug is not fixed in the next release.