PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.5.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.5.0
5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 3.0.70 3.0.71 3.0.72 3.1.0 All 34 releases
double-opt-in / core / cron.php

cron.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 5.5.0, at core/cron.php

58 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace forge12\contactform7\CF7DoubleOptIn;
3
4 use Forge12\Shared\Logger;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10 /**
11 * Registriert alle Cronjobs für das Plugin.
12 */
13 function add_cron_jobs() {
14 $logger = Logger::getInstance();
15
16 // 🔹 Daily Telemetry Job — abgeschafft, und bestehende Planungen aufräumen.
17 //
18 // Der Job hat täglich an einen Endpoint gepostet, den es nicht mehr gibt:
19 // silentshield.forge12.com trägt ein Zertifikat für einen fremden Host
20 // (CN=portal.silentchat.de, abgelaufen am 14.07.2026) und liefert auf dem
21 // Telemetrie-Pfad 404. Übertragen wurde deshalb ohnehin nichts — WordPress
22 // prüft das Zertifikat und die Verbindung scheiterte.
23 //
24 // Das hat allerdings einen zweiten Fehler verdeckt: der Job wurde
25 // unabhängig von der Einstellung "telemetry" geplant, und send_snapshot()
26 // hat sie nie geprüft. Wer Telemetrie abgeschaltet hatte, hätte also
27 // gesendet, sobald der Endpoint zurückkommt. Solange es kein funktionierendes
28 // Ziel gibt, wird gar nicht mehr geplant; die Zähler laufen weiter lokal,
29 // weil die Review-Notice sie braucht.
30 //
31 // Aufräumen ist Pflicht, nicht Kosmetik: auf bestehenden Installationen
32 // steht der Job bereits im WP-Cron und bliebe dort für immer stehen.
33 if ( wp_next_scheduled( 'f12_cf7_doubleoptin_daily_telemetry' ) ) {
34 wp_clear_scheduled_hook( 'f12_cf7_doubleoptin_daily_telemetry' );
35 $logger->info( "Cron event removed", [
36 'plugin' => 'double-opt-in',
37 'job' => 'f12_cf7_doubleoptin_daily_telemetry',
38 'reason' => 'telemetry transport retired — no reachable endpoint',
39 ] );
40 }
41
42 // Add cron
43 if ( ! wp_next_scheduled( 'dailyOptinClear' ) ) {
44 wp_schedule_event( time(), 'daily', 'dailyOptinClear' );
45 $logger->info( 'Cron event scheduled', [
46 'plugin' => 'double-opt-in',
47 'job' => 'dailyOptinClear',
48 'interval' => 'daily',
49 ] );
50 } else {
51 $logger->debug( 'Cron event already scheduled', [
52 'plugin' => 'double-opt-in',
53 'job' => 'dailyOptinClear',
54 'interval' => 'daily',
55 ] );
56 }
57 }
58