WP Webhooks / Docs / fswa_cron_token_regenerated
Action since v1.14.0

fswa_cron_token_regenerated

Fires immediately after the external cron secret is regenerated.

$

/ Signature

do_action( 'fswa_cron_token_regenerated' )

/ When it fires

Fires inside `DispatcherController::regenerateCronToken()` after the new secret has been written to the database, before the REST response is returned. The Pro plugin hooks into this action to rebuild the Uptime Kuma monitor URL so the next ping uses the updated token.

/ Examples

Sync an external monitoring URL after cron token rotation

add_action( 'fswa_cron_token_regenerated', function () {
    $new_token = get_option( 'fswa_cron_secret' );
    $monitor_url = add_query_arg( 'token', $new_token, 'https://monitoring.example.com/ping' );
    update_option( 'my_monitor_url', $monitor_url );
} );

/ Related

Ready

Stop losing webhooks.
Start logging them.

$ wp plugin install flowsystems-webhook-actions --activate