【发布时间】:2018-10-01 10:32:52
【问题描述】:
我在functions.php中有函数:
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['billing']['billing_infos'] = array(
'type' => 'textarea',
'label' => __('Podaj NIP', 'woocommerce'),
'placeholder' => _x('Tutaj możesz wpisać NIP', 'placeholder', 'woocommerce'),
'required' => false,
'class' => array('form-row-wide'),
'clear' => true
);
return $fields;
}
此代码将自定义字段添加到帐单表单。它工作正常,因为当我像普通用户一样下订单时会看到它。问题在于管理面板中此字段的数据。我看不到它。请问这方面有什么帮助吗?
【问题讨论】:
标签: php wordpress woocommerce checkout orders