Skip to content

Instantly share code, notes, and snippets.

@digamber89
Last active August 4, 2022 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digamber89/2ffe57504909526b5ecb0b6d26396fd3 to your computer and use it in GitHub Desktop.
Save digamber89/2ffe57504909526b5ecb0b6d26396fd3 to your computer and use it in GitHub Desktop.
Zoom WooCommerce Appointments - Show Join via Browser only
<?php
function cm_220801_modified_gcal_sync( $data, $appointment ) {
remove_filter( 'woocommerce_appointments_gcal_sync', 'cm_220801_modified_gcal_sync' );
$data = '';
$appointment_id = $appointment->get_id();
$meeting_details = get_post_meta( $appointment_id, '_vczapi_woocommerce_appointments_meeting_details', true );
if ( ! empty( $meeting_details ) ) {
$meeting = json_decode( $meeting_details );
if ( is_object( $meeting ) ) {
$pwd = ! empty( $meeting->password ) ? $meeting->password : false;
$data['description'] .= __( 'Join Zoom Meeting ', 'vczapi-woocommerce-appointments' ) .
html_entity_decode( \Codemanas\ZoomWooCommerceAppointments\Main\DataStore::get_browser_join_link( $meeting->id, $pwd ) ) . PHP_EOL;
}
}
return $data;
}
add_filter( 'woocommerce_appointments_gcal_sync', 'cm_220801_modified_gcal_sync' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment