• Resolved duckpindesign

    (@duckpindesign)


    There seems to be a common issue with checkout fields (the CC info fields) that are broken.

    With our theme, we’ve found an issue where the stripe gateway extension registers a script and uses “jquery” as a dependency.

    wp_register_script( 'wc_stripe_payment_request', plugins_url( 'assets/js/stripe-payment-request' . $suffix . '.js', WC_STRIPE_MAIN_FILE ), array( 'jquery', 'stripe' ), WC_STRIPE_VERSION, true );

    In theory, this is a good idea as it checks to see whether jquery is loaded or not. BUT, not all theme developers use the WP version of jquery. Many custom theme developers (and even third-party theme developers) de-register the WP core version of jquery and compile their own. This is good practice for custom themes, as it saves the overhead of loading jquery as a separate call to the server.

    So… the problem is that we’re de-registering the WP core version of jquery, and your extension is looking for that as a dependency. We HAVE jquery available through our single compiled/minified scripts file, but that doesn’t solve the issue of the dependency search.

    We’d love to see an update to the extension that removes this dependency check, or at the very least gives the option via an administrative option. I think this would solve a lot of your “fields not showing” headaches here in the support portal.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Solution to broken checkout fields’ is closed to new replies.