WPDM Premium Packages – Causing JavaScript Errors all over

in Download Manager Free

Viewing 2 posts - 1 through 2 (of 2 total)
Oct 21, 2017 at 7:05 pm
#64737
Member
Shawn Rebelo
OP

This plugin is causing problems for other plugins. It breaks everything except Download Manager.

The reason:
Download Manager is loading DateTimePicker. That is only loaded when adding a file, that’s good.
WPDM Premium Packages wpdmpp-admin.js is loaded with other plugins and on line 45 it calls datetimer picker.
It crashes all other JS. “Uncaught TypeError: $(…).datetimepicker is not a function”.

A fix:
Line 45:
Replace
$('#sales-price-expire-field, .coupon_expire').datetimepicker({dateFormat:"yy-mm-dd", timeFormat: "hh:mm tt"});
With:

	if($('#sales-price-expire-field').length || $('.coupon_expire').length){
		$('#sales-price-expire-field, .coupon_expire').datetimepicker({dateFormat:"yy-mm-dd", timeFormat: "hh:mm tt"});
	}

Line: 94
Replace:
jQuery('.taxstate,.taxcountry,.wpdmpp-currecy-dropdown').chosen({width:'200px'});
With:

	if($('.taxstate').length || $('.taxcountry').length || $('.wpdmpp-currecy-dropdown').length){
    	       jQuery('.taxstate,.taxcountry,.wpdmpp-currecy-dropdown').chosen({width:'200px'});
	}
Oct 22, 2017 at 8:01 pm
#64756
Moderator
Shahriar
Staff

Hi Shawn,

Thanks a lot  for reporting the issue. We are releasing a new version of Premium Package to fix this issue.

Best Regards.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic "WPDM Premium Packages – Causing JavaScript Errors all over" is closed to new replies.