Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Zoom_Helpers::unregister_user( $email, string $meeting_key, $action_data )
For un-registering user to meeting action method.
Contents
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $user_id
(Required)
- $meeting_key
(Required)
Return Return
(array)
Source Source
File: src/integrations/zoom/helpers/zoom-helpers.php
public function unregister_user( $email, $meeting_key ) { $client = $this->get_client(); if ( ! $client || empty( $client['access_token'] ) ) { return array( 'result' => false, 'message' => __( 'Zoom credentails have expired.', 'uncanny-automator' ), ); } $response = wp_remote_post( $this->automator_api, array( 'body' => array( 'action' => 'unregister_meeting_user', 'access_token' => $client['access_token'], 'meeting_key' => $meeting_key, 'email' => $email, ), ) ); if ( ! is_wp_error( $response ) ) { if ( 201 === wp_remote_retrieve_response_code( $response ) || 204 === wp_remote_retrieve_response_code( $response ) ) { return array( 'result' => true, 'message' => __( 'Successfully unregistered', 'uncanny-automator' ), ); } else { $body = json_decode( wp_remote_retrieve_body( $response ), true ); $error = ''; if ( isset( $body['data']['message'] ) ) { $error = $body['data']['message']; } elseif ( isset( $body['error']['description'] ) ) { $error = $body['error']['description']; } return array( 'result' => false, 'message' => __( $error, 'uncanny-automator' ), ); } } return array( 'result' => false, 'message' => __( 'WordPress was not able to communicate with Zoom API.', 'uncanny-automator' ), ); }
Expand full source code Collapse full source code View on Github