Created
August 4, 2022 08:59
-
-
Save digamber89/4632a971dcffe00f9f9747c197ba68ec to your computer and use it in GitHub Desktop.
Zoom WooCommerce Appointments - add zoom link to ICS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function cm_20220801_add_zoom_link_to_ics( $ics_a, $appointment, $object ) { | |
$appointment_id = $appointment->get_id(); | |
$meeting_details = json_decode( get_post_meta( $appointment_id, '_vczapi_woocommerce_appointments_meeting_details', true ) ); | |
if ( empty( $meeting_details ) ) { | |
return $ics_a; | |
} | |
$join_link_url = $meeting_details->join_url; | |
$ics_a['url'] = 'URL;VALUE=URI:' . $join_link_url; | |
return $ics_a; | |
} | |
add_filter( 'wc_appointments_ics_appointment', 'cm_20220801_add_zoom_link_to_ics', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment