Support » Plugin: Payment Plugins Braintree For WooCommerce » Can not edit Checkout page with last version Elementor

  • Resolved pumpky

    (@laitnesse2020)


    Hi,

    I get a critical error when I try to edit Checkout page with Elementor after I finish the sandbox test. I deactivated all plugins except woocommerce, elementor, and Pro but still got the same error.
    The sandbox test is going well, just can’t edit checkout page with Elementor.
    The following is the error information:

    “An error of type E_ERROR was caused in line 63 of the file …/wp-content/plugins/woo-payment-gateway/includes/gateways/class-wc-braintree-cc-payment-gateway.php. Error message: Uncaught Error: Call to a member function enqueue_script() on null in …/wp-content/plugins/woo-payment-gateway/includes/gateways/class-wc-braintree-cc-payment-gateway.php:63
    Stack trace:
    #0 …/wp-content/plugins/woo-payment-gateway/includes/abstract/abstract-class-wc-braintree-payment-gateway.php(346): WC_Braintree_CC_Payment_Gateway->enqueue_checkout_scripts(NULL)
    #1 …/wp-content/plugins/woo-payment-gateway/includes/abstract/abstract-class-wc-braintree-payment-gateway.php(231): WC_Braintree_Payment_Gateway->enqueue_frontend_scripts(NULL)
    #2…/wp-content/plugins/woocommerce/templates/checkout/payment-method.php(30): WC_Braintree_Payment_Gateway->payment_fields()
    #3 …/wp-content/plugins/woocommerce/includes/wc-core-functions.php(344): include(‘/home/laitness/…’)”

    WordPress version 5.5
    Woocommerce version 4.4.1
    Current plugin: Braintree For WooCommerce (version 3.2.5)
    PHP version 7.3.21
    Elementor version 3.0.4
    Elementor Pro version 3.0.1

    I will appreciate your help.
    Desmond

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @laitnesse2020,

    Thank your for contacting us. This error is being triggered for the following reason:

    The Frontend Scripts class used by the Braintree plugin gets enqueue when the request is coming from the frontend. But with Elementor, you are simulating the checkout page from within the Admin section so the plugin doesn’t create an instance of the Frontend Scripts class.

    I will have to make an adjustment in the next version so the scripts class is created if the request is for Elementor.

    Kind Regards,

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @laitnesse2020,

    I am almost ready to release the next version of the plugin. If you are able, please reach out to me via the Help button located on all settings pages of the Braintree plugin. I’d like you to test the new version to ensure you don’t encounter that error with Elementor.

    Kind Regards,

    Thread Starter pumpky

    (@laitnesse2020)

    Hi mr.clayton,

    Sorry for the late reply. I’ve just updated to the version 3.2.6, I am able to edit the checkout page with elementor now. But I saw an error output on the console, and I thought you’d like to know.


    wc-braintree.min.js?ver=3.2.6:1 Uncaught (in promise) TypeError: Cannot read property ‘hide’ of undefined at PayPal.wc_braintree.CheckoutGateway.payment_gateway_changed (wc-braintree.min.js?ver=3.2.6:1) at PayPal.<anonymous> (paypal.js?ver=3.2.6:57)

    wc_braintree.CheckoutGateway.payment_gateway_changed @ wc-braintree.min.js?ver=3.2.6:1
    (anonymous) @ paypal.js?ver=3.2.6:57
    Promise.then (async)
    PayPal.create_button @ paypal.js?ver=3.2.6:56
    wc_braintree.PayPal @ wc-braintree.min.js?ver=3.2.6:1
    PayPal @ paypal.js?ver=3.2.6:7
    (anonymous) @ paypal.js?ver=3.2.6:137
    (anonymous) @ paypal.js?ver=3.2.6:139

    Thank you so much for the quick fix to my problem.
    Have a good day.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can not edit Checkout page with last version Elementor’ is closed to new replies.