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 / src / Events / Mail / ReminderSentEvent.php

ReminderSentEvent.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 5.5.0, at src/Events/Mail/ReminderSentEvent.php

81 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Reminder Sent Event
4 *
5 * @package Forge12\DoubleOptIn\Events\Mail
6 * @since 3.4.0
7 */
8
9 namespace Forge12\DoubleOptIn\Events\Mail;
10
11 use Forge12\DoubleOptIn\EventSystem\Event;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Class ReminderSentEvent
19 *
20 * Dispatched after a reminder email is sent to an unconfirmed opt-in.
21 */
22 class ReminderSentEvent extends Event {
23
24 private int $optInId;
25 private string $recipient;
26 private string $subject;
27 private bool $success;
28 private string $trigger;
29
30 /**
31 * Constructor.
32 *
33 * @param int $optInId The opt-in record ID.
34 * @param string $recipient The recipient email.
35 * @param string $subject The email subject.
36 * @param bool $success Whether sending was successful.
37 * @param string $trigger The trigger source: 'cron' or 'manual'.
38 */
39 public function __construct(
40 int $optInId,
41 string $recipient,
42 string $subject,
43 bool $success,
44 string $trigger = 'cron'
45 ) {
46 parent::__construct();
47 $this->optInId = $optInId;
48 $this->recipient = $recipient;
49 $this->subject = $subject;
50 $this->success = $success;
51 $this->trigger = $trigger;
52 }
53
54 /**
55 * {@inheritdoc}
56 */
57 public static function getWordPressHookName(): string {
58 return 'f12_cf7_doubleoptin_reminder_sent';
59 }
60
61 public function getOptInId(): int {
62 return $this->optInId;
63 }
64
65 public function getRecipient(): string {
66 return $this->recipient;
67 }
68
69 public function getSubject(): string {
70 return $this->subject;
71 }
72
73 public function wasSuccessful(): bool {
74 return $this->success;
75 }
76
77 public function getTrigger(): string {
78 return $this->trigger;
79 }
80 }
81