Last active
September 7, 2021 07:12
-
-
Save techies23/3d0cd52a64a214543182741ac43e8a7e to your computer and use it in GitHub Desktop.
Remove purchase restriction for WooCommerce integration for Zoom Meetings
This file contains hidden or 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_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