add data from woocommerce form
-
Dears,
thanks for this plugin
i tried to add data from woocommerce form but it failed
for example: add first name
i used this code in function.php
”
function example_custom_order_fields( $fields, $order ) {
$new_fields = array();if( get_post_meta( $order->id, ‘billing_first_name’, true ) ) {
$new_fields[‘billing_first_name’] = array(
‘label’ => ‘First name’,
‘value’ => get_post_meta( $order->id, ‘billing_first_name’, true )
);
}
return array_merge( $fields, $new_fields );
}
add_filter( ‘wcdn_order_info_fields’, ‘example_custom_order_fields’, 10, 2 );”
can you solve this problem ?
The topic ‘add data from woocommerce form’ is closed to new replies.