function apbctCheckAddToCartByGet() should be defined before used
-
In /wp-content/plugins/cleantalk-spam-protect/js/apbct-public-bundle.min.js?ver=6.40 the function apbctCheckAddToCartByGet is used sonner than is defined. Content is in this order:
….
ctPublic.wc_ajax_add_to_cart||apbctCheckAddToCartByGet(),
….
apbctCheckAddToCartByGet=function(){
I had active /wp-admin/options-general.php?page=cleantalk > “Async JavaScript loading”https://pagespeed.web.dev/ reported:
Browser errors were logged to the console
…js/apbct-public-bundle.min.js?ver=6.40:1:35100
TypeError: apbctCheckAddToCartByGet is not a function at apbct_ready (…/wp-content/plugins/cleantalk-spam-protect/js/apbct-public-bundle.min.js?ver=6.40:1:35101) at …/wp-content/plugins/cleantalk-spam-protect/js/apbct-public-bundle.min.js?ver=6.40:1:569501) Shouldn’t the function be defined before it is used, in order to be always working well when included as async JavaScript?
2) Maybe there are some more functions that should be defined before they are used?Thank you for your plugin
- You must be logged in to reply to this topic.