Skip to content

Instantly share code, notes, and snippets.

@techies23
Last active December 9, 2022 06:28
Show Gist options
  • Save techies23/9995d39b2b8c5bb33c8f2ccc9d55454a to your computer and use it in GitHub Desktop.
Save techies23/9995d39b2b8c5bb33c8f2ccc9d55454a to your computer and use it in GitHub Desktop.
Change booking title for Zoom Event Booking on Zoom portal.
<?php
//Add this to your functions.php in your active theme.
add_filter( 'vczapi_woo_addon_meeting_title', 'vczapi_woo_addon_meeting_title_20220628', 10, 4 );
function vczapi_woo_addon_meeting_title_20220628( $text, $booking_id, $product_id, $host_id ) {
$booking = get_wc_booking( $booking_id );
$customer_name = $booking->get_customer()->name;
if ( ! empty( $customer_name ) ) {
return "Booking Session by " . $customer_name . " for " . get_the_title( $product_id ) . '-' . $booking_id;
} else {
return "Booking Session for " . get_the_title( $product_id ) . '-' . $booking_id;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment