Add attributes to print order
-
Hi guys
Fails to add attributes when order print.
Attribute is “author”i use this code from FAQ
function example_custom_order_fields( $fields, $order ) { $new_fields = array(); if( get_post_meta( $order->id, 'author', true ) ) { $new_fields['author'] = array( 'label' => 'VAT', 'value' => get_post_meta( $order->id, 'author', true ) ); } if( get_post_meta( $order->id, 'author', true ) ) { $new_fields['author'] = array( 'label' => 'Author', 'value' => get_post_meta( $order->id, 'author', true ) ); } return array_merge( $fields, $new_fields ); } add_filter( 'wcdn_order_info_fields', 'example_custom_order_fields', 10, 2 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add attributes to print order’ is closed to new replies.