Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
Beep Beep

Deepen Bajracharya techies23

🎧
Beep Beep
View GitHub Profile
@techies23
techies23 / functions.php
Last active Sep 7, 2021
Remove purchase restriction for WooCommerce integration for Zoom Meetings
View functions.php
add_filter( 'vczapi_woocommerce_check_deadline_crossed_meeting_date', 'vczapi_deadline_check', 20 );
/**
* @param $meeting_date DateTime
*
* @return mixed
*/
function vczapi_deadline_check( $meeting_date ) {
if ( ! empty( $meeting_date ) ) {
$timezone = $meeting_date->getTimezone()->getName();
$current_date = vczapi_dateConverter( 'now', $timezone, false );
View zoom-listing.php
<?php
/**
* The Template for displaying all single meetings
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom/shortcode/zoom-listing.php.
*
* @package Video Conferencing with Zoom API/Templates
* @version 3.2.2
* @updated 3.6.0
*/
View zoom-recordings-by-meeting.php
<?php
/**
* The Template for displaying list of recordings via meeting ID
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom/shortcode/zoom-recordings-by-meeting.php.
*
* @package Video Conferencing with Zoom API/Templates
* @version 3.5.0
*/
@techies23
techies23 / zoom-recordings.php
Created Mar 1, 2021
Bypass pop-up when clicking “View Recording” [zoom_list_host_meetings host=”YOUR_HOST_ID”]
View zoom-recordings.php
<?php
/**
* The Template for displaying list of recordings via Host ID
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom/shortcode/zoom-recordings.php.
*
* @package Video Conferencing with Zoom API/Templates
* @version 3.5.0
*/
@techies23
techies23 / functions.php
Created Feb 25, 2021
Directly letting users join meeting via browser without further interaction.
View functions.php
<?php
/**
* Paste below code to your functions.php file in your theme.
*
* NOTE: If user is not logged in this code will not work because when joining a meeting from browser - User name is a required field and since
* this below code directly triggers the join button on load. Users will not be able to join the meeting without a name.
*
* The reason this would work with logged in users is because username is already selected in the join via browser page if a user is logged in.
*/
add_action( 'vczapi_join_via_browser_after_script_load', function () {
@techies23
techies23 / register.php
Created Feb 23, 2021
Change registration link to default Zoom registration link instead of native site link.
View register.php
<?php
/**
* The template for displaying meeting join and start links
*
* This template can be overridden by copying it to yourtheme/video-conferencing-zoom-pro/fragments/join-links.php.
*
* @author Deepen.
* @created_on 11/19/19
*/
@techies23
techies23 / functions.php
Created Feb 3, 2021
Change role for WP user. For Video conferencing zoom PRO when registering in a meeting a new user is created role.
View functions.php
//Add below code to your theme's functions.php file
add_filter('vczapi_pro_on_wp_user_create', 'vczapi_change_role');
function vczapi_change_role( $role ) {
$role['role'] = 'your_custom_role';
return $role;
}
@techies23
techies23 / functions.php
Created Jan 18, 2021
Deactivate Moment JS of Video Conferencing with Zoom API plugin for removing conflicts
View functions.php
//Paste below to your functions.php file in your theme
function codemanas_dequeue_script() {
wp_dequeue_script( 'video-conferencing-with-zoom-api-moment' );
wp_deregister_script( 'video-conferencing-with-zoom-api-moment' );
wp_dequeue_script( 'video-conferencing-with-zoom-api-moment-timezone' );
wp_deregister_script( 'video-conferencing-with-zoom-api-moment-timezone' );
}
add_action( 'wp_print_scripts', 'codemanas_dequeue_script', 100 );
@techies23
techies23 / functions.php
Created Dec 16, 2020
Show custom user roles on Assign to Host ID page
View functions.php
add_filter('zvc_allow_zoom_host_id_user_role', 'vczapi_allow_host_id_roles');
function vczapi_allow_host_id_roles($roles) {
$roles[] = 'your_user_role_slug_1';
$roles[] = 'your_user_role_slug_2';
return $roles;
}
@techies23
techies23 / functions.php
Created Dec 8, 2020
Change permalink "zoom-meetings" to something custom. For https://wordpress.org/plugins/video-conferencing-with-zoom-api/ plugin.
View functions.php
//NOTE: After adding below code - Goto wp-admin > Settings > Permalinks and hit save button to apply changes.
add_filter('vczapi_cpt_slug', 'vczapi_change_slug');
function vczapi_change_slug() {
return 'custom-slug';
}