• Resolved Epug88

    (@ehmar)


    Plugin version: 2.9.2
    wp version: 5.7.2

    Error shows in browser console on “My Account” pages

    Uncaught TypeError: Cannot read property ‘indexOf’ of undefined

    <script id='jquery-js-after'>
    jQuery( function( $ ) {
    	$('a').each(function(e){
    		// for lack of specific classes on the my account action buttons we check the url
    		if( $(this).attr('href').indexOf('generate_wpo_wcpdf') != -1 ){
    			$(this).attr('target', '_blank');
    		};
    	});
    });
    </script>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Getting the same error on our site. Had to deactivate the plugin as this JS error prevents all other JS on the site from running.

    Plugin Contributor Ewout

    (@pomegranate)

    Apologies for the inconvenience. This should only affect the “my account” pages. We have already added a fix (here if you feel comfortable editing plugin files) that we will include in the next update.

    Plugin Contributor Ewout

    (@pomegranate)

    Version 2.9.3 was released today and addresses this issue!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught TypeError: Cannot read property ‘indexOf’ of undefined’ is closed to new replies.