class MAS_Google_Client_Wrapper { private $client; public function __construct($user_id = null) { if (!$user_id) { $user_id = get_current_user_id(); } $client_id = get_user_meta($user_id, 'mas_gmeet_client_id', true); $client_secret = get_user_meta($user_id, 'mas_gmeet_client_secret', true); $tokens = get_user_meta($user_id, 'mas_gmeet_tokens', true); $redirect_uri = admin_url('admin.php?page=mas-gmeet-callback'); if (!$client_id || !$client_secret) { throw new Exception(__('Google Client ID/Secret not set. Please configure in your Instructor Dashboard → Google Meet Settings.', 'meeting-attendance')); } $this->client = new Google_Client(); $this->client->setClientId($client_id); $this->client->setClientSecret($client_secret); $this->client->setRedirectUri($redirect_uri); $this->client->addScope(Google_Service_Calendar::CALENDAR); if (!$tokens) { throw new Exception(__('Google account not connected. Please connect from your Google Meet Settings tab.', 'meeting-attendance')); } $this->client->setAccessToken($tokens); if ($this->client->isAccessTokenExpired() && $this->client->getRefreshToken()) { $new_token = $this->client->fetchAccessTokenWithRefreshToken($this->client->getRefreshToken()); update_user_meta($user_id, 'mas_gmeet_tokens', $new_token); $this->client->setAccessToken($new_token); } } public function get_client() { return $this->client; } } Disclaimer – Sangeet Ka Sparsh
🎉 Special Offer! Use coupon code "WELCOME10" for 10% off your first purchase. 🎉

Disclaimer

The Website is provided “as is” without any warranties, express or implied. Sangeet Ka Sparsh does not warrant that the Website will be error-free, uninterrupted, or secure.

While we strive to provide high-quality music instruction and resources, we cannot guarantee specific outcomes or results. Individual progress and skill acquisition may vary depending on factors such as practice time, natural aptitude, and personal dedication.

The information and materials provided on this website are for educational purposes only and should not be considered as a substitute for professional music instruction. While consistent engagement with the course content, including watching videos and attending live classes, is crucial, it is important to note that the development of musical skills, such as playing an instrument, primarily depends on dedicated practice. Regular practice, using correct posture and techniques, is essential for achieving proficiency.

We strongly recommend enrolling in live support courses for optimal learning. A live instructor can provide real-time feedback, ensuring correct posture, technique, and overall playing style. Early correction of mistakes is crucial as incorrect techniques can become ingrained, hindering future progress.

We are not liable for any damages or losses arising from the use of the information or materials provided on this website. By accessing and using this website, you agree to these terms and conditions.