'integer', 'default' => Subscription::DEFAULT_GRACE_DAYS, 'sanitize_callback' => 'absint', ]); register_setting('abovault', 'abovault_max_retries', [ 'type' => 'integer', 'default' => 4, 'sanitize_callback' => 'absint', ]); register_setting('abovault', 'abovault_retention_enabled', [ 'type' => 'string', 'default' => 'yes', 'sanitize_callback' => [self::class, 'sanitizeYesNo'], ]); } /** Whitelist a yes/no option to exactly 'yes' or 'no'. */ public static function sanitizeYesNo($value): string { return $value === 'yes' ? 'yes' : 'no'; } public function render(): void { global $wpdb; $counts = $wpdb->get_results( 'SELECT status, COUNT(*) c FROM ' . Subscription::table() . ' GROUP BY status', ARRAY_A ) ?: []; ?>

__('Trialing', 'abovault'), 'active' => __('Active', 'abovault'), 'past_due' => __('Past due', 'abovault'), 'canceled' => __('Canceled', 'abovault'), 'expired' => __('Expired', 'abovault'), ]; ?>