Skip to content

Instantly share code, notes, and snippets.

@techies23
Last active September 7, 2021 07:12
Show Gist options
  • Save techies23/3d0cd52a64a214543182741ac43e8a7e to your computer and use it in GitHub Desktop.
Save techies23/3d0cd52a64a214543182741ac43e8a7e to your computer and use it in GitHub Desktop.
Remove purchase restriction for WooCommerce integration for Zoom Meetings
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 );
if ( $current_date > $meeting_date ) {
$new_date = $meeting_date->add( new DateInterval('PT10H30S') );
return $new_date;
}
}
return $meeting_date;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment