Giter Site home page Giter Site logo

Comments (3)

ValeDeOro avatar ValeDeOro commented on August 16, 2024

Additional information from the customer, after he talked to Stripe developers:

It looks like the WooCommerce Stripe plugin code does not correctly handle exceptions when adding cards to Customer objects. You can see the code below:

https://github.com/woothemes/woocommerce-gateway-stripe/blob/master/includes/legacy/class-wc-gateway-stripe.php#L544

You can see that the code is checking the return value of the add_card method, but is not catching exceptions thrown by the Stripe PHP bindings, which the method by which the bindings communicate errors.

Without catching exceptions, you'll see this "uncaught exception" error from PHP, and the application will fail to continue.

The particular code with this problem is treated as legacy code by WooCommerce.

The legacy code is loaded when the WC_Payment_Gateway_CC class cannot be found:
https://github.com/woothemes/woocommerce-gateway-stripe/blob/7e70e76eb6761db2af65f00ccaaba25bde7b794a/woocommerce-gateway-stripe.php#L289

The class was added in 2.6.0:
https://github.com/woothemes/woocommerce/blob/117990d95fd0536413d8b9204f6cddbdfb52132e/includes/gateways/class-wc-payment-gateway-cc.php#L9

from woocommerce-gateway-stripe.

gedex avatar gedex commented on August 16, 2024

@ValeDeOro that means store uses WC 2.6 but still on old version of WC Stripe.

from woocommerce-gateway-stripe.

roykho avatar roykho commented on August 16, 2024

According to @gedex this can be closed as customer just needs to update to the latest release.

from woocommerce-gateway-stripe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.