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; } } Sangeet Ka Sparsh – Online Guitar Courses Website
🎉 Special Offer! Use coupon code "WELCOME10" for 10% off your first purchase. 🎉

Learn to Play Guitar...

Hiten Verma

I am a Skilled Music Producer, Classical Singer and Vocalist with 6 years of teaching experience. Proficient in Electric , Classical and Acoustic Guitar, Piano, Harmonium and Classical Singing.

Online Guitar Courses

Best Guitar Courses for Beginners

[timed_coupon_offer campaign="test"]

Acoustic Guitar Courses

Demo for Beginner Guitar Course

Complete Course for Beginner Guitar Course

Live Sessions for Beginner Guitar Course

Month Wise - Without Live Classes for Beginner Guitar Course

Month Wise - With 2 Live Classes for Beginner Guitar Course

Month Wise - With 4 Live Classes for Beginner Guitar Course

Features

Customer satisfaction is our main motive.

Money-Back Guarantee

3 Days Money Back Guarantee * (Terms and conditions apply)

Access on Mobile and Computer

Access the course through Computer and Mobile devices

Certificate of completion

Certificate will be issued after completion of course

Online Content with limited validity

Online content has time validity. Designed so one has to complete in time bond manner