本文介绍了从 WooCommerce 中删除支付网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一家 WooCommerce 商店(在本地运营),但我想删除支付网关.客户应该可以下订单而无需支付任何费用,我会手动向他们发送发票.

I have a WooCommerce shop (running local) but I want to remove the payment gateways. The customer should be able to place an order without paying any cent, I will send them an invoice manually.

我真的找不到在哪里禁用它,这似乎不是 WooCommerce 中的标准.

I can not really find where to disable this, it seems not to be standard in WooCommerce.

已尝试在后端禁用所有支付网关,但您必须启用一个支付网关.

Have tried disabling all the payment gateways in the backend, but you have to leave one payment gateway enabled.

提前致谢!

推荐答案

只需在你的主题中的functions.php 中添加这一行:add_filter('woocommerce_cart_needs_payment', '__return_false');

Just add this line in functions.php in your theme:add_filter('woocommerce_cart_needs_payment', '__return_false');

这篇关于从 WooCommerce 中删除支付网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 05:32