Add extra fields
-
Hi,
I need to add some extra fields to the invoice.
I sow into another comment that you gave a code:
`add_filter( ‘wcdn_order_info_fields’, ‘wcdn_order_info_fields_function’, 10, 2 );
public static function wcdn_order_info_fields_function( $fields, $order ) {
$new_fields = array();$locations_label = “Your Custom label”;
$output = “Your custom data which you want to output”;
$new_fields[ $locations_label ] = array(
‘label’ => $locations_label,
‘value’ => $output
);return array_merge( $fields, $new_fields );
}But it did not work. The site crashed.
Can you help me?
This is the website:https://etupperware.ro/
And the fields I need to add are above “Recomandat de” : “Nume” and “oras”
- The topic ‘Add extra fields’ is closed to new replies.