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

Cart

Remove item Thumbnail image Product Price Quantity Subtotal
Placeholder test ongoing 400.00
400.00
Month 5 - Beginner Guitar Course (Acoustic) - 30 + 10 Days Validity (Without Live Classes) Month 5 - Beginner Guitar Course (Acoustic) - 30 + 10 Days Validity (Without Live Classes) 2,999.00
2,999.00

Cart totals

Subtotal 3,399.00
Total 3,399.00