【发布时间】:2016-06-15 10:39:35
【问题描述】:
我在订单中创建了很多自定义字段,现在我正在尝试在感谢页面上完成订单后访问它们。
我看到了this 的回复,但它对我不起作用。我做了一个 var dump 来查看 $order->order_custom_fields 里面的内容,但我只得到了 string(0) ""
我正在编辑文件 order-details-customer.php 如何访问我的自定义字段?
这是我创建的自定义字段的示例
woocommerce_form_field( 'destination_state', array(
'type' => 'text',
'class' => array('destination_state form-row-first'),
'label' => __('State'),
'required' => true,
), $checkout->get_value( 'destination_state' ));
【问题讨论】:
标签: php wordpress woocommerce