【发布时间】:2021-07-10 07:01:34
【问题描述】:
我在 WooCommerce 结帐中额外添加了三个字段(CVR 编号、参考编号和 ønsket 杠杆数据)。它们在结账时正确显示,但一旦下订单,信息就不会发送到 WooCommerce 后端/订单概览。如何发送信息以便我们接收?
function add_woocommerce_billing_fields($billing_fields){
//reorder woo my billing address form fields
$billing_fields2['billing_first_name'] = $billing_fields['billing_first_name'];
$billing_fields2['billing_last_name'] = $billing_fields['billing_last_name'];
$billing_fields2['billing_vat'] = array(
'type' => 'text',
'label' => __('CVR nummer', 'keyelp-shop-customization' ),
'class' => array('form-row-wide'),
'required' => true,
'clear' => true
);
$billing_fields2['billing_ref'] = array(
'type' => 'text',
'label' => __('Reference nummer', 'keyelp-shop-customization' ),
'class' => array('form-row-wide'),
'required' => false,
'clear' => true
);
$billing_fields2['billing_date'] = array(
'type' => 'text',
'label' => __('Ønsket leveringsdato', 'keyelp-shop-customization' ),
'class' => array('form-row-wide'),
'required' => false,
'clear' => true
);
$merged_billing_fields = $billing_fields2 + $billing_fields;
return $merged_billing_fields;
}
【问题讨论】:
标签: php wordpress woocommerce checkout orders