Skip to content
Docs
Get RestroPress

Filter

rpress_webhooks_log_retention_days

Updated
On this page

Filters how many days webhook deliveries are kept in the log.

Used by rpress_webhooks_prune_log(), which runs on the rpress_daily_scheduled_events cron hook and deletes rows created before the cutoff, whatever their status. Values below 1 are raised to 1. Stored request bodies contain customer personal data, so keep retention no longer than you need.

Available since RestroPress 3.5.1.

Parameters#

ParameterTypeDescription
$daysintDays. Default 30.

Return value#

int. Days to keep.

Example#

add_filter( 'rpress_webhooks_log_retention_days', 'my_webhook_retention', 10, 1 );
function my_webhook_retention( $days ) {
	return 14;
}

Source#

Applied in:

  • includes/features/webhooks/delivery.php (line 498), in rpress_webhooks_prune_log()
Was this page helpful?