Support » Plugin: Payment Plugins for Stripe WooCommerce » Call to undefined method “discardNonPersistentHeaders”

  • Resolved Damir Tahiri



    When we tried to connect your plugin with stripe, website went down and we got this error on it:

    Call to undefined method Stripe\Util\RequestOptions::discardNonPersistentHeaders()...

    Both WooCommerce and your Stripe For WooCommerce plugins are updated, and I tried deactivating W3 Total Cache to see if that will help, but without luck.

    It’s a live website so I am not conformable with deactivating all other plugins, but if it’s required, I will do it.

    Full error message:

    Fatal error: Uncaught Error: Call to undefined method Stripe\Util\RequestOptions::discardNonPersistentHeaders() in /home/teachyog/public_html/wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/BaseStripeClient.php:135 Stack trace: #0 /home/teachyog/public_html/wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/Service/AbstractService.php(59): Stripe\BaseStripeClient->request('post', '/v1/customers', Array, Object(Stripe\Util\RequestOptions)) #1 /home/teachyog/public_html/wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/Service/CustomerService.php(86): Stripe\Service\AbstractService->request('post', '/v1/customers', Array, Array) #2 /home/teachyog/public_html/wp-content/plugins/woo-stripe-payment/includes/class-wc-stripe-api-operation.php(93): Stripe\Service\CustomerService->create(Array, Array) #3 /home/teachyog/public_html/wp-content/plugins/woo-stripe-payment/includes/class-wc-stripe-customer-manager.php(60): WC_Stripe_API_Operation->__call('create', Array) #4 /home/teac in /home/teachyog/public_html/wp-content/plugins/woo-stripe-payment/vendor/stripe/stripe-php/lib/BaseStripeClient.php on line 135

    Can you please help?

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


    Hi @tahireu,

    Do you have another stripe plug-in enabled or a plug-in that utilizes the stripe API? From what I can tell there is another plug-in loading the stripe PHP library and it’s an older version.

    My plug-in uses an updated version of the stripe PHP library and if another plug-in is loading an older version it will have unsupported methods which can trigger the error you’re encountering.

    Kind regards,

    Thread Starter Damir Tahiri


    Thanks for quick answer! Actually we do have a “Contact Form 7 – PayPal & Stripe Add-on” plugin which we use to sell things over CF7.

    After I deactivate it, it works just fine!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Call to undefined method “discardNonPersistentHeaders”’ is closed to new replies.