gpb_bookable_name
Description
Filter the display name of a service or resource by ID.
Usage
Applied globally
add_filter( 'gpb_bookable_name', 'my_custom_function' );Applied to specific form
add_filter( 'gpb_bookable_name_FORMID', 'my_custom_function' );Parameters
$name
string
The current name.
$id
int
The post ID of the service/resource.
$bookable
Bookable
The bookable object.
Examples
Change the display name
add_filter( 'gpb_bookable_name', function( $name, $id, $bookable ) {
if ( $id === 123 ) {
$name = 'Custom Name';
}
return $name;
}, 10, 3 );Since
1.0-beta-2.4Hook added.