Customer customer information fields on Invoice form
Hello,
I wanna use custom field in my invoice.
Can you give me php example how to use custom field with id? Should i use esc_html_e or esc_attr? I need working php example...
My info field and id is - {info_field#1123}
Example like here - <?php esc_html_e('Item', 'bookly' ); ?>
Any help would be helpful. Thanks.
0
Comments
Hello Rysard,
File wp-content/plugins/bookly-addon-invoices/backend/components/invoice/Invoice.php:64
foreach ( json_decode( $customer->getInfoFields() ) as $info_field ) {$value = nl2br( esc_html( is_array( $info_field->value ) ? implode( ',', $info_field->value ) : $info_field->value ) );
$codes[ '{info_field#' . $info_field->id . '}' ] = $value;
}
Hello, thank you very much. Works perfectly!
Hi @Rysard,
Could you kindly paste the working solution in a reply?
I was not able to configure it.
Best Regards,
Please sign in to leave a comment.