Skip to content

Commit

Permalink
Merge pull request #800 from Codeinwp/bugfix/298
Browse files Browse the repository at this point in the history
Automatically update chart data
  • Loading branch information
selul authored May 25, 2021
2 parents 1355fbe + f48b864 commit 65d97ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/Visualizer/Module/Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ public function setJsonSchedule() {

if ( -1 < $time ) {
add_post_meta( $chart_id, Visualizer_Plugin::CF_JSON_SCHEDULE, $time );
// Update schedules.
$schedules = get_option( Visualizer_Plugin::CF_JSON_SCHEDULE, array() );
$schedules[ $chart_id ] = time() + $time * HOUR_IN_SECONDS;
update_option( Visualizer_Plugin::CF_JSON_SCHEDULE, $schedules );
}
wp_send_json_success();
}
Expand Down

0 comments on commit 65d97ed

Please sign in to comment.