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_woo_membership_restrict_content_start(){ | |
ob_start(); | |
} | |
add_action( 'vczoom_single_content_right','cm_woo_membership_restrict_content_start', 1 ); | |
function cm_woo_membership_restrict_content_end(){ | |
$content = ob_get_clean(); | |
echo do_shortcode('[wcm_restrict]'.$content.'[/wcm_restrict]'); | |
} | |
add_action( 'vczoom_single_content_right','cm_woo_membership_restrict_content_end', 100 ); |
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_change_booking_title( $meeting_params, $wc_booking, $product_id, $order_id ) { | |
$order = wc_get_order( $order_id ); | |
if( is_object($order)){ | |
$name = $order->get_billing_first_name() .' '. $order->get_billing_last_name(); | |
$product = wc_get_product($product_id); | |
$meeting_params['meetingTopic'] = $product->get_name().' - '.$name.' - '.$order_id; | |
} | |
return $meeting_params; | |
} |
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_turn_on_video_settings( $meeting_params ) { | |
$meeting_params['option_host_video'] = true; | |
$meeting_params['option_participants_video'] = true; | |
return $meeting_params; | |
} |
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_exclude_past_meeting_products( $q ) { | |
$args = [ | |
'post_type' => 'zoom-meetings', | |
'posts_per_page' => - 1, | |
'meta_query' => [ | |
'relation' => 'AND', | |
[ |
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 | |
add_action('init','remove_zoom_meetings_from_woocommerce_my_accoount_page'); | |
function remove_zoom_meetings_from_woocommerce_my_accoount_page(){ | |
$orders = \Codemanas\ZoomWooCommerceAddon\Orders::get_instance(); | |
remove_filter( 'woocommerce_account_menu_items', array( $orders, 'meeting_link' ), 5 ); | |
add_action( 'woocommerce_account_wc-zoom-meetings_endpoint', array( $orders, 'display_links' ) ); | |
} |
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 | |
add_action('vczapi_before_zoom_product_saved','change_zoom_product_on_create'); | |
/** | |
* @param WC_Product $product | |
*/ | |
function change_zoom_product_on_create($product){ | |
$product->set_catalog_visibility('visible'); | |
} |
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 | |
add_filter('vczapi_woo_addon_create_meeting_params','umberto_change_booked_meeting_title',10,4); | |
function umberto_change_booked_meeting_title($meeting_params,$wc_booking, $product_id, $order_id){ | |
$meeting_params['meetingTopic'] = get_post_meta($order_id, 'wpcf-meeting-topic', true); | |
return $meeting_params; | |
} |
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
add_filter( 'vczapi_users_list', 'vczapi_my_additional_users' ); | |
function vczapi_my_additional_users( $users ) { | |
$obj = ( object) [ | |
'id' => 'your_host_id_here', | |
'first_name' => 'your_first_name', | |
'last_name' => 'your_last_name', | |
'email' => 'your_email_address' | |
]; | |
$users[] = $obj; |
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
add_action( 'vczapi_appointments_after_meeting_details', 'cm_show_phone_numbers' ); | |
function cm_show_phone_numbers($meeting_details){ | |
$numbers = $meeting_details->settings->global_dial_in_numbers; | |
echo '<strong> Dial In Numbers: </strong>'; | |
foreach ( $numbers as $number ) { | |
echo '<p><a href="tel:'.$number->number.'">'.$number->number.' ( '.$number->country_name.' )</a></p>'; | |
} | |
} |
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
/** | |
* Add PDF Link to Calendar Popover | |
*/ | |
add_filter( 'vczapi-pro-calendar-extended-props', 'codemanas_add_calendar_additional_fields', 10, 2 ); | |
function codemanas_add_calendar_additional_fields( $extendedProps, $meeting_id ) { | |
$pdf_link = get_post_meta( $meeting_id, 'vczapi_meeting_pdf_link', true ); | |
$pdf_html = ! empty( $pdf_link ) ? '<div class="pdf-link"><a href="' . $pdf_link . '" target="_blank" rel="nofollow noopener">Things to read before the meeting</a></div>' : ''; | |
$extendedProps['meetingPDFLink'] = $pdf_html; | |
return $extendedProps; |