WooCommerce

WooCommerce: 打印订单

WooCommerce的订单页面内容繁多,如果直接打印后台页面,想必是惨不忍睹,还好有一款免费插件可以解决这个问题——WooCommerce Print Invoices & Delivery Notes,这个插件的好处是通过修改模版,你可以打印订单中的任何内容,漂亮的打印出来。

继续阅读WooCommerce: 打印订单
WooCommerce

错误:Call to a member function is_visible() on a non-object

在使用WooCommerce过程中,如果修改了shop base page的固定链接,会引发错误Call to a member function is_visible() on a non-object。

错误提示类似下面这样:

Fatal error: Call to a member function is_visible() on a non-object in yoursite\wp-content\plugins\woocommerce\templates\content-product.php on line 25

访问shop页面会出现这个错误,访问其他页面没问题,解决的方法是

设置 » 固定链接中重新保存一下固定链接

继续阅读错误:Call to a member function is_visible() on a non-object
WooCommerce

Woocommerce:如何根据国家设置支付方式

Woocommerce中,送货方式(Shipping method)可以根据国家不同而不同,支付网关(Payment Gateways)却无法选择国家,只要开启了某种支付方式,不管用户选择哪个国家,都会出现。

中国普遍使用支付宝,paypal也有一定用户,下面的代码可以让用户选择中国时只出现支付宝和paypal两种支付方式,如果这两种方式都没有启用,则显示其余启用的支付方式。

继续阅读Woocommerce:如何根据国家设置支付方式