Hi Manfred,
You can use the {Unformatted Booking ID} dynamic tag for this.
Sorry, i just re-read your message and noticed you want to replace the #, not remove it. You can either use the tag i mentioned above and manually add a hyphen before it, or you can create your own dynamic tag, you can find instructions here: https://www.wpbookingsystem.com/documentation/creating-custom-dynamic-tags/
So something like this:
add_filter('wpbs_dynamic_tag', function($content, $tag, $data){
// Check what tag we are replacing
if ($tag != '{Custom Booking ID}') {
return $content;
}
$id = '-' . $data['booking']->get('id');
return str_replace($tag, $id, $content);
}, 10, 3);
Hello Roland. Thank you very much for your quick reply.
Unfortunately, the code doesn’t work.
Do you have any idea what could be causing this?
Would something like this perhaps be possible to integrate?
// Define prefixes per form
$prefix_map = [
1 => 'AB-', // Form ID 1
2 => 'CD-', // Form ID 2
3 => 'XY-', // Form ID 3
];
Best regards
Yes, it’s possible, could you please send an email at [email protected] mentioning this ticket? I need to send you an updated version of the plugin as well 🙂
Okay, I’ll do that. No update is being shown to me: I thought I had the latest version — “WP Booking System Premium 5.12.3.”