I’m trying to use [billing_cpf] but it doesn’t appear in the PDF.
Billing_cpf is a custom field.
I put this code in my template_function.php:
function wcdn_custom_order_fields( $fields, $order ) {
if ( ! empty( $order->billing_cpf ) ) {
$fields[‘billing_cpf’] = array(
‘label’ => ‘CPF’,
‘value’ => $order->billing_cpf,
);
}
return $fields;
}
add_filter( ‘wcdn_order_info_fields’, ‘wcdn_custom_order_fields’, 10, 2 );
Which code I need to use in my invoice.php?