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_wc_check_valid_deadline', '__return_false' ); |
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 | |
/** | |
* My Bookings | |
* | |
* Shows customer bookings on the My Account > Bookings page | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce-bookings/myaccount/bookings.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to |
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( 'wp_footer', 'cm_vczapi_change_sorting_for_recoring' ); | |
function cm_vczapi_change_sorting_for_recoring() { | |
ob_start(); | |
?> | |
(function($){ | |
$recordingMeetingDatatable = $('.cm-vczapi-custom-data-table'); | |
if($recordingMeetingDatatable !== undefined && $recordingMeetingDatatable.length > 0){ | |
$recordingMeetingDatatable.DataTable({ | |
responsive: true, |
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 | |
/** | |
* @param WC_Product $objProduct | |
*/ | |
function cm_set_zoom_product_visibility_to_shown_by_default($objProduct){ | |
$objProduct->set_catalog_visibility('visible'); | |
} | |
add_action('vczapi_before_new_zoom_product_saved','cm_set_zoom_product_visibility_to_shown_by_default'); |
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 | |
if ( class_exists( '\Codemanas\ZoomWooBookingAddon\WooCommerce\Orders' ) ):; | |
remove_action( 'woocommerce_order_item_meta_end', [ Codemanas\ZoomWooBookingAddon\WooCommerce\Orders::get_instance(), 'email_meeting_details' ], 20 ); | |
add_action( 'woocommerce_order_item_meta_end', 'cm_email_meeting_details_without_zoom_via_app', 20, 3 ); | |
function cm_email_meeting_details_without_zoom_via_app( $item_id, $item, $order ) { | |
if ( $order->get_status() === "completed" || $order->get_status() === "processing" ) { | |
$product_id = $item['product_id']; | |
$post_id = get_post_meta( $product_id, '_vczapi_zoom_post_id', true ); | |
if ( ! empty( $post_id ) ) { | |
$fields = get_post_meta( $post_id, '_meeting_fields_woocommerce', true ); |
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 | |
if ( class_exists( '\Codemanas\ZoomWooCommerceAddon\Cart' ) ) { | |
remove_filter( 'woocommerce_cart_item_name', [ \Codemanas\ZoomWooCommerceAddon\Cart::get_instance(), 'cart_meeting_details' ], 10 ); | |
add_filter( 'woocommerce_cart_item_name', 'cm_zoom_cart_meeting_details', 10, 3 ); | |
function cm_zoom_cart_meeting_details( $name, $cart_item, $cart_item_key ) { | |
$product_id = $cart_item['product_id']; | |
$post_id = get_post_meta( $product_id, '_vczapi_zoom_post_id', true ); | |
if ( ! empty( $post_id ) ) { | |
$meeting_details = get_post_meta( $post_id, '_meeting_fields', true ); |
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('wp_print_scripts','cm_dont_load_moment'); | |
function cm_dont_load_moment(){ | |
if(is_singular('zoom-meetings') ){ | |
wp_dequeue_script('moment'); | |
wp_deregister_script('moment'); | |
} | |
} |
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 | |
$join_link = \Codemanas\ZoomWooBookingAddon\DataStore::get_join_link($booking); | |
if($join_link){ | |
?> | |
<tr> | |
<th style="text-align:left; border: 1px solid #eee;" scope="row"><?php _e('Join meeting','woocommerce-bookings'); ?></th> | |
<td style="text-align:left; border: 1px solid #eee;"><?php echo $join_link; ?></td> | |
</tr> | |
<?php | |
} |
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 | |
//Change Join Via App and Join Via Browser text for WooCommerce Bookings | |
add_filter( 'vczoom_join_meeting_via_app_text', 'cm_change_join_via_app_text' ); | |
function cm_change_join_via_app_text( $join_via_app_text ) { | |
$join_via_app_text = 'Join Zoom Via App'; | |
return $join_via_app_text; | |
} | |
add_filter( 'vczoom_join_meeting_via_browser_text', 'vczoom_join_meeting_via_browser_text' ); |
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_woocommerce_appointments_create_meeting_params', 'cm_change_meeting_topic_title_for_appointments',10,4); | |
function cm_change_meeting_topic_title_for_appointments ($meeting_params, WC_Appointment $wc_appointment, $proudct_id, $order_id){ | |
$order = wc_get_order($order_id); | |
$full_name = $order->get_billing_first_name() .' '.$order->get_billing_last_name(); | |
$meeting_params['meetingTopic'] = "Appointment for ".$full_name.' - '.$wc_appointment->get_id(); | |
return $meeting_params; | |
} |