• Resolved Raquel

    (@keuls)


    Hi,

    The card form in the checkout doesn’t allow to input the card details.

    I upgraded to the latest Woocommerce version earlier today, it may be related but I’m not 100% sure.

    There is a js error on the checkout page:

    Uncaught ReferenceError: WC_Square_Payment_Form_Handler is not defined
    at HTMLDocument.<anonymous> ((index):799:57)
    at e (jquery.min.js:2:30038)
    at t (jquery.min.js:2:30340)

    I can reproduce it in Chrome and Safari (haven’t tried other browsers).

    I’ve taken a staging copy of my production site and installed a different payment gateway in the production one for now.
    The staging site is: https://www.staging7.glazemepretty.com/

    Regards,
    Raquel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @keuls,

    Thanks for setting that up. I do see the situation you’ve mentioned where the credit card fields can’t be loaded. These are inserted into the page via JavaScript so the console error is likely related.

    Could I get you to disable all plugins except for WooCommerce and Square on the staging site? Also, switch to the Twenty Twenty or Storefront themes. Then see if this still happens.

    I did run into an SSL error while trying to load the staging site. SSL is required for Square to function so I did want to mention that just in case it becomes an issue.

    Let us know what you find out and we’ll go from there.

    Thanks!

    Thread Starter Raquel

    (@keuls)

    Hi @3sonsdevelopment

    The other thing I did recently is enable some frontend speed optimisations on the SG Optimizer plugin. And indeed it’s the “Defer Render-blocking JavaScript” feature that’s causing the error in the Square form. If I disable that feature in SG Optimizer the payment from works fine.

    However, the wp-includes/js/jquery/jquery.min.js was excluded from the js deferral. Do you recommend adding any other scripts from your side to the exclusion list?

    Regards,

    Raquel

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @keuls,

    Great question. I would suggest excluding these two scripts that are included with Square for use on the front-end of the site.

    
    wc-square.js
    wc-square-digital-wallet.js
    

    If you have any questions, just let us know.

    Cheers

    Thread Starter Raquel

    (@keuls)

    In the end I had to switch off all frontend javascript optimisations in SG Optimizer.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can’t input card details’ is closed to new replies.