我在 wordpress admin > woocommerce > settings > checkout 中使用 Woocommerce 订阅时突然出现致命错误

I'm getting a sudden fatal error using Woocommerce subscriptions in wordpress admin > woocommerce > settings > checkout

我有一个 wordpress 安装 运行 woocommerce 订阅和会员资格已经运行了数周,现在我突然收到以下错误消息:

'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'

此消息位于以下位置的管理区域中:wordpress admin > woocommerce > settings > checkout

当试图查看单个产品页面时,它也会出现在前端。

我已经尝试禁用所有插件以确定任何可能的冲突和问题的路径,只是确定问题仅在 Woocommerce 订阅插件处于活动状态时仍然存在。

听起来您需要更新服务器的 cainfo 包。它是一个包含一束 CA 根证书的文件,curl 用于验证主机 SSL 证书。 WooCommerce 订阅插件使用 curl 向 PayPal 发送请求,它会尝试验证该请求。

首先下载最新的cacert.pem文件。从 http://curl.haxx.se/docs/caextract.html 获取。将它放在您的 php 目录中。

然后将此行添加到您的 php.ini 文件 curl.cainfo=c:\php\cacert.pem。显然更改路径以匹配您的实际目录。

如果您无法访问这些内容,请联系您的服务器技术支持。

感谢 http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ 提醒我处理这个问题的程序

编辑:WordPress 4.4 更新附带更新的 ca-bundle.crt。如果您的 WordPress 不是最新的,您可能想尝试简单地更新。

更新:在与 Woothemes 支持交谈后,我可以确认这个问题是 Wordpress 4.4 中的一个错误的结果 installation.They 为我提供了一个更新的 ca-bundle.crt 文件,我把它放在wp-includes/certificates 现在一切正常 again.I 建议任何其他有此问题的 wocommerce 订阅用户向 Woothemes 提交支持票,概述此问题并请求更新的 ca-bundle.crt 文件,直到这个已在新的 Wordpress 更新中修复。