I cannot add a new field in the printout
-
I used the code he provided to add new fields in the order printout. But that didn’t work for me.
Attached you will find the link of the plug-in, the code I used, and the various images of the results of the implementation of the code.
function tags_custom_order_fields( $fields, $order ) { $new_fields = array(); if( get_post_meta( $order->id, 'wcot-order-tags-order-tag', true ) ) { $new_fields['wcot-order-tags-order-tag'] = array( 'label' => 'Tag:', 'value' => get_post_meta( $order->id, 'wcot-order-tags-order-tag', true ) ); } } add_filter( 'wcdn_order_info_fields', 'tags_custom_order_fields', 10, 2 );
https://www.linkpicture.com/q/1_1498.jpg
https://www.linkpicture.com/q/2_1084.jpg
https://www.linkpicture.com/q/3_824.jpg
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘I cannot add a new field in the printout’ is closed to new replies.