我正在创建一个新的自定义插件,需要检索所有woocommerce订单
我尝试使用:wc_get_orders()函数检索所有woocommerce订单,但我得到了
Uncaught Error: Call to undefined function wc_get_orders()
就这样做了:
require_once '../woocommerce/includes/wc-order-functions.php';
但我得到了:
require_once(../woocommerce/includes/wc-order-functions.php): failed to o
在Woocommerce中,我使用WooCommerce打印发票和包装列表插件,并且我试图显示一个定制订单元数据值,这是发票中的一个交货日期。
这是我在主题的functions.php文件中的代码:
function sv_wc_pip_add_order_delivery_shipping( $order_id, $order ) {
//$order_id = 25775; (this method is working but is static and not dynamic)
$order_id = $order->get_id();
$invoi