如何将产品添加到现有的和已支付的 Woocommerce 订单中? [英] How can I add a product to an existing and paid Woocommerce order?

查看:28
本文介绍了如何将产品添加到现有的和已支付的 Woocommerce 订单中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 WooCommerce 网站,我的一位客户在该网站上购买了产品和电缆.

I have a WooCommerce website where one of my customers bought a product and a cable.

该客户购买的电缆与其他产品不兼容,并询问我们是否可以向他发送价格相同的兼容电缆.

This customers bought a cable that isn't compatible with the other product, and asked if we could ship him the compatible one, that has the same price.

也许这是一个愚蠢的问题,但我如何编辑已经付款的订单,移除不兼容的电缆并添加正确的产品?

Maybe it's a stupid question, but how can I edit the order, which has been already paid, removing the incompatible cable and adding the correct product?

有可能吗?我需要插件吗?

Is it possibile? Do I need a plugin or something?

先谢谢你,卢卡

推荐答案

如果订单的状态不是暂停"(例如,completed),则默认情况下无法进行编辑.

If the status of the order is not "On Hold" (e.g., completed), then editing is not possible by default.

要允许编辑所有订单状态,您可以使用 wc_order_is_editable 过滤器:

To allow editing for all order statuses, you can use the wc_order_is_editable filter:

add_filter( 'wc_order_is_editable', '__return_true' );

(例如,您可以将此代码放在主题的functions.php 文件中)

(you can put this code in the functions.php file of your theme, for example)

这篇关于如何将产品添加到现有的和已支付的 Woocommerce 订单中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆