• Resolved jansudek

    (@jansudek)


    Hello, I have a issue/problem with plugin Jetpack, Woocommerce on Checkout page can’t apply coupon code..

    Uncaught TypeError: Cannot read properties of undefined (reading 'addAction')
        at HTMLBodyElement.<anonymous> (pokladna/:1853:16)
        at HTMLBodyElement.dispatch (jquery.min.js?ver=3.7.1:2:40035)
        at v.handle (jquery.min.js?ver=3.7.1:2:38006)
        at Object.trigger (jquery.min.js?ver=3.7.1:2:70124)
        at HTMLBodyElement.<anonymous> (jquery.min.js?ver=3.7.1:2:70726)
        at Function.each (jquery.min.js?ver=3.7.1:2:3129)
        at e.<computed>.each (jquery.min.js?ver=3.7.1:2:1594)
        at e.<computed>.trigger (jquery.min.js?ver=3.7.1:2:70701)
        at Object.init (checkout.min.js?ver=8.7.0:1:1878)
        at HTMLDocument.<anonymous> (checkout.min.js?ver=8.7.0:1:14817)
    // Check if jQuery is available
                    if (typeof jQuery !== 'undefined') {
                        // This is only triggered on the checkout shortcode.
                        jQuery(document.body).on('init_checkout', function() {
                            if (true === cartItem_e296a3737090f6c29306aced1f0e44c3_logged) {
                                return;
                            }
                            wp.hooks.addAction('wcpay.payment-request.availability', 'wcpay', function(args) {
                                properties.express_checkout = args.paymentRequestType;
                            });
                            properties.checkout_page_contains_checkout_block = '0';
                            properties.checkout_page_contains_checkout_shortcode = '1';
    
                            _wca.push(properties);
                            cartItem_e296a3737090f6c29306aced1f0e44c3_logged = true;
    
                        });
                    }

    Jetpack v13.2.2
    WooCommerce v8.7.0

Viewing 9 replies - 1 through 9 (of 9 total)
  • jj

    (@jjjoel)

    Having the same problem! The hotfix is to just update this line in jetpack/modules/woocommerce-analytics/classes/class-jetpack-woocommerce-analytics-universal.php from:

    if ( true === cartItem_{$cart_item_key}_logged )

    to this:

    if ( true === cartItem_{$cart_item_key}_logged || !('hooks' in wp) )

    This code is part of Jetpack’s Woocommerce Analytics implementation, which looks like will be deprecated in the next version, per this PR, so hopefully this will magically fix itself in the next release.

    robertsba1

    (@robertsba1)

    hotfix from @jjjoel worked for me; thanks. I did find two locations in class-jetpack-woocommerce-analytics-universal.php so changed both. Hope that hasn’t broken something else ??

    Plugin Support Erina (a11n)

    (@eri32s98)

    Thanks for the info @jjjoel!

    @jansudek, you can try the hotfix suggested or wait for the Jetpack 13.3 release which is planned for next week.

    Hello,

    This issue is not resolved. Kindly please help me.

    • This reply was modified 7 months, 3 weeks ago by anish9947.
    Plugin Support lastsplash (a11n)

    (@lastsplash)

    Hi @anish9947

    Per this thread:

    https://www.ads-software.com/support/topic/jetpack-plugin-bug/#post-17553632

    We are investigating your issue and will follow-up via email.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi?@anish9947,

    I’m going to mark this thread as solved. If you have any further questions or need more help, you’re welcome to open another thread here. Cheers!

    Thread Starter jansudek

    (@jansudek)

    mark as not resolved ..

    still not fixed, can’t add coupon at checkout page ..

    Jetpack v13.3.1

    Mehdi Benchalal

    (@muffinpeace)

    Hi @jansudek,

    The fix for the bug was merged and published, so the fix should be available in the next Jetpack release (v13.3.2), meanwhile, you can disable the WooCommerce Analytics feature below until then:

    https://example.com/wp-admin/admin.php?page=jetpack_modules

    Best,

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    I’m going to mark this thread as solved. If you have any further questions or need more help, you’re welcome to open another thread here. Cheers!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘woocommerce checkout coupon can’t add’ is closed to new replies.