Hello,
Thanks for your message. We understand what you’re looking for, and as you’ve noticed, the default special tag {customer_info}
is a pre-formatted string that contains all the customer information. If you wish to display specific customer details, then you should access the apposite customer record object through the apposite PHP variable available in the template file for the invoice generation.
By editing the template file from the Configuration page, you will find some useful PHP comments at the top of the file that show how to access the customer object for then displaying only the desired billing/contact information.
More precisely, the PHP comments in the template file show how the below PHP code will access the customer information record (if any):
$customer = VikBooking::getCPinInstance()->getCustomerFromBooking($booking_info['id']);
Then you can print/display the desired information on your preferred section of your HTML template file by using the code below (or similar):
<?php echo $customer['first_name'] ?? ''; ?>
You can actually debug the whole content of the customer associative array as explained in the PHP comments. This is the only way to display specific customer details on custom positions/sections of your template file, and this applies of course to any template file (confirmation email, invoice ecc..).
We hope this helps!
The VikWP Team