Skip to content

Commit

Permalink
move option code into core plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Akhill2020 committed Sep 13, 2024
1 parent c5a595a commit 1483f5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/oauthhelper/oauth-service-actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ public function auth_get_calendarlist()

if (isset($response_arr['response']) && !empty($response_arr['response'])) {
if ($response_arr['response']) {
return $response_arr;
$get_calendars_defaultcolors = $response_arr['defaultColors'];

if (isset($get_calendars_defaultcolors) && is_array($get_calendars_defaultcolors)) {
update_option('simple-calendar_defaultcolors', $get_calendars_defaultcolors);
}
return $response_arr['data'];
} else {
$response = [
'Error' => __('There is something wrong. please re-try.', 'google-calendar-events'),
Expand Down

0 comments on commit 1483f5b

Please sign in to comment.