Viewing 1 replies (of 1 total)
  • Where do you want to add this field?

    When it’s data that is already tied to the order you should have no problem adding this. (I think this is also handled in the FAQ of the plugin).

    But say I wanted to add some type of order meta to an invoice:

    function my_order_info_fields( $fields, $order ) {
    	$fields[] = array(
    		'label' => 'City',
    		'value' => $order->billing_city
    	);
    
    	return $fields;
    }
    add_filter( 'wcdn_order_info_fields', 'my_order_info_fields', 10, 3 );

    This filter can be found in the print-content.php file in the templates/print-order directory. There are a few more actions and filters there that could help you do what you want.

    I don’t know what your plugin adds, but I’m sure you should be able to find something in their documentation on how to retrieve the data they are storing.

Viewing 1 replies (of 1 total)
  • The topic ‘add Custom Field’ is closed to new replies.