4

I have a wordpress install running woocommerce subscriptions and memberships that's been working fine for weeks, and now all of a sudden I'm receiving the following error message:

'fatal error: Uncaught exception 'Exception' with message 'SSL certificate problem: unable to get local issuer certificate' in... .../wp-content/plugins/woocommerce-subscriptions/includes/gateways/paypal/includes/abstracts/abstract-wcs-sv-api-base.php on line 154'

This message is in the admin area at the following location: wordpress admin > woocommerce > settings > checkout

It's also present on the front-end when trying to view a single product page.

i've tried disabling all plugins to determine any possible conflicts and the route of the issue, only to determine that the issue persists only when the Woocommerce Subscriptions plugin is active.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Loz
  • 121
  • 6

2 Answers2

3

UPDATE: After speaking with Woothemes support I can confirm that this issue is the consequence of a bug in the Wordpress 4.4 installation.They provided me with an updated ca-bundle.crt file which I placed in wp-includes/certificates and all is now working again.I suggest that any other users of wocommerce subscriptions with this issue put in a support ticket to Woothemes outlining this issue and request an updated ca-bundle.crt file until this is fixed in a new Wordpress update.

Loz
  • 121
  • 6
  • I dont think they gave you an updated one more like a downgraded one from an older build: https://wordpress.org/download/release-archive/ – Shrek Dec 27 '15 at 18:13
  • Yep, that's a very good point. Though I haven't tried replacing this file with one from an older build, so I can't vouch for that I'm afraid. – Loz Dec 28 '15 at 09:18
  • 1
    I did just that yesterday with the 4.3.1 build crt and the issue went away. – Shrek Dec 28 '15 at 15:21
  • 1
    Yep yep yep to the above, downloaded the 4.3.1 also and working again. – StuartM Jan 04 '16 at 23:03
2

Sounds like you need to update your server's cainfo bundle. It's a file that contains a bundle of CA root certificates that curl uses to verify a host SSL certificate. The WooCommerce Subscriptions plugin uses curl to send a request to PayPal which it would try to verify.

First download the latest cacert.pem file. Get it from http://curl.haxx.se/docs/caextract.html. Place it in your php directory.

Then add this line to your php.ini file curl.cainfo=c:\php\cacert.pem. Obviously change the path to match your actual directory.

If you can't get access to this stuff it's time to talk to your server tech support.

Credit to http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ for reminding me the procedure to deal with this problem

EDIT: WordPress 4.4 update came with updated ca-bundle.crt. You may want to try simply updating if your WordPress is not up to date.

James Jones
  • 3,850
  • 5
  • 25
  • 44