Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1341470

    We are still seeing a JQuery Not Defined error on checkout pages:

    Sorry I have put the wrong version name in the support ticket title.
    Version is 4.8.9.1 – Current version.

    Example in private content. (Please add something to the basket first then go to checkout)

    Is this on the radar for Enfold Version 4.9?

    Error in console
    Uncaught ReferenceError: jQuery is not defined
    ad (index):615:4

    I am seeing this error on all of my Enfold Ecommerce sites. It does not seem to affect the checkout process so luckily users can still pay for goods.

    • This topic was modified 2 years, 10 months ago by thinkjarvis. Reason: Wrong version of Enfold in Ticket Title
    #1341521

    Hey Thomas,
    Thanks for the link to your site, the JQuery Not Defined error is due to this custom script:

    	(function($) {
    		// wait until everything completely loaded all assets
    		$(window).on('load', function() {
    			// remove the click event
    			$( document.body ).off( 'click', 'a.woocommerce-terms-and-conditions-link' );
    		});
    	}(jQuery));

    2022-02-20_002.jpg
    I see the script has a comment // wait until everything completely loaded all assets but since since jQuery 3.5.1 (window).on(‘load’ is deprecated.
    Try window.addEventListener instead like this:

    // wait until everything completely loaded all assets
    window.addEventListener('DOMContentLoaded', function() {
    (function($) {
    	// remove the click event
    	$( document.body ).off( 'click', 'a.woocommerce-terms-and-conditions-link' );
    });
    }(jQuery));
    });

    So check your functions.php for this script and adjust.

    Best regards,
    Mike

    #1341540

    Thanks Mike for going above and beyond.

    I think this is caused by a mod I made to the search script. Using a snippet from another forum post.

    I’ll check the file and report back.

    EDIT: See resonse below. Custom Code is fine. No custom JS in fuctions file. This is caused by Enfold see my latest reply for location of problem.
    Your fix seems to work though but needs adding to the 4.9 release of Enfold

    • This reply was modified 2 years, 10 months ago by thinkjarvis.
    #1341543

    Hi,
    Ok, we will leave this open to hear back from you.

    Best regards,
    Mike

    #1341603

    DELETED SEE NEXT POST for problem

    • This reply was modified 2 years, 10 months ago by thinkjarvis. Reason: Deleted see next post for correct response
    #1341608

    This is a bug with Enfold and affects all Enfold sites
    I have replaced the lines on the example site
    Fixed by adding your code. See source I commented out the original so it is still there.

    The cause is
    Enfold/config-woocommerce/config.php on line 2999
    and
    Enfold/config-woocommerce/config-356.php on line 2493

    Please can you add your fix to the next release?

    • This reply was modified 2 years, 10 months ago by thinkjarvis.
    #1341627

    Hi,
    Thanks for pointing this out, I submitted it to the Dev Team.

    Best regards,
    Mike

    #1341790

    Hi,
    The Dev Team has corrected the two files:
    /enfold/config-woocommerce/config.php
    /enfold/config-woocommerce/config-356.php

    below is a DropBox link to them, you can replace your file with these via FTP.
    This has been merged into the master, but unfortunately didn’t make the v4.9 release, so it will be in the next release.

    Best regards,
    Mike

    #1342042

    Thanks Mike,

    Much appreciated.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Bug: Checkout Error WooCommerce Compatibility 4.8.1’ is closed to new replies.