Account_API::update_event_for_multiple_accounts_support( WP_Post $event )
Update the Zoom account on existing events before Multiple Account Support.
Contents
Parameters
- $event
-
(WP_Post) (Required) The event post object.
Return
(bool|void) Whether the account has been added.
Source
File: src/Tribe/Meetings/Zoom/Account_API.php
public function update_event_for_multiple_accounts_support( $event ) {
$event = tribe_get_event( $event->ID );
if ( ! $event instanceof \WP_Post ) {
return;
}
if ( empty( $event->virtual ) ) {
return;
}
if ( empty( $event->zoom_meeting_id ) ) {
return;
}
$account_id = get_post_meta( $event->ID, $this->account_id_meta_field_name, true );
if ( $account_id ) {
return;
}
$account_id = tribe_get_option( Settings::$option_prefix . 'original_account', '' );
if ( empty( $account_id ) ) {
return;
}
$this->save_account_id_to_post( $event->ID, $account_id );
return true;
}
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |