Skip to content

Commit

Permalink
fix: update cron handler name
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenn00dle committed Oct 16, 2024
1 parent adc7f02 commit a1d2e88
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function init() {
add_action( 'admin_init', [ __CLASS__, 'cron_init' ] );
add_action( 'delete_option_' . self::get_sitekit_ga4_has_connected_admin_option_name(), [ __CLASS__, 'log_disconnected_admins' ] );
add_filter( 'update_user_metadata', [ __CLASS__, 'maybe_log_disconnected_reason' ], 10, 5 );
add_action( self::CRON_HOOK, [ __CLASS__, 'maybe_log_disconnected_admins' ] );
add_action( self::CRON_HOOK, [ __CLASS__, 'handle_cron_event' ] );
}
}

Expand Down Expand Up @@ -105,9 +105,9 @@ public static function maybe_log_disconnected_reason( $check, $object_id, $meta_
/**
* Logs when cron event runs and all admins are disconnected.
*/
public static function maybe_log_disconnected_admins() {
public static function handle_cron_event() {
if ( ! get_option( self::get_sitekit_ga4_has_connected_admin_option_name(), false ) ) {
self::log( self::LOG_CODE_DISCONNECTED, 'Google Site Kit has been disconnected', false );
self::log( self::LOG_CODE_DISCONNECTED, 'No active Google Site Kit connections found', false );
}
}

Expand Down

0 comments on commit a1d2e88

Please sign in to comment.