使用woocommerce配置PayPal或Paypal Pro的时候,网关对SSL证书有检测流程,而如果你的网站配置了全站SSL,但是woocommerce里没有强制ssl,则可能会出现The Secure checkout option is disabled on your site的报错。
报错内容
首先我们先来回顾复现一下报错现场,当启用paypal插件后,wordpress后台显示出一段报错信息:
PayPal-Pro gateway requires SSL certificate for better security ,The Secure checkout option is disabled on your site. Please ensure your server has a valid SSL certificate so you can enable the SSL option on your checkout page.

强制启用SSL
使用浏览器访问: https://yourwebsite.com/wp-admin/options.php 将yourwebsite更换为你的域名再回车访问。
在访问后的页面 使用快捷键Ctrl+F调出搜索框,输入:force ssl checkout,定位到woocommerce_force_ssl_checkout这一项。
将后面的no更改为yes,保存后再返回wordpress后台,就会发现The Secure checkout option is disabled on your site.的报错已经消失,问题解决了

