PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.6.2
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.6.2
5.6.2 5.6.3 5.6.1 5.6.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 All 38 releases
double-opt-in / src / Events / Lifecycle / OptInDeletedEvent.php

OptInDeletedEvent.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 5.6.2, at src/Events/Lifecycle/OptInDeletedEvent.php

76 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * OptIn Deleted Event
4 *
5 * @package Forge12\DoubleOptIn\Events\Lifecycle
6 * @since 4.0.0
7 */
8
9 namespace Forge12\DoubleOptIn\Events\Lifecycle;
10
11 use Forge12\DoubleOptIn\EventSystem\Event;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Class OptInDeletedEvent
19 *
20 * @api
21 *
22 * Dispatched when an opt-in record is deleted.
23 * Covered by the Addon API semver policy as of Core API 4.3.0.
24 */
25 class OptInDeletedEvent extends Event {
26
27 private string $hash;
28 private string $email;
29 private string $deletedBy;
30 private int $rowsDeleted;
31
32 /**
33 * Constructor.
34 *
35 * @param string $hash The opt-in hash.
36 * @param string $email The subscriber email.
37 * @param string $deletedBy Who deleted it (admin, cron, user).
38 * @param int $rowsDeleted Number of rows deleted.
39 */
40 public function __construct(
41 string $hash,
42 string $email,
43 string $deletedBy,
44 int $rowsDeleted = 1
45 ) {
46 parent::__construct();
47 $this->hash = $hash;
48 $this->email = $email;
49 $this->deletedBy = $deletedBy;
50 $this->rowsDeleted = $rowsDeleted;
51 }
52
53 /**
54 * {@inheritdoc}
55 */
56 public static function getWordPressHookName(): string {
57 return 'f12_cf7_doubleoptin_deleted';
58 }
59
60 public function getHash(): string {
61 return $this->hash;
62 }
63
64 public function getEmail(): string {
65 return $this->email;
66 }
67
68 public function getDeletedBy(): string {
69 return $this->deletedBy;
70 }
71
72 public function getRowsDeleted(): int {
73 return $this->rowsDeleted;
74 }
75 }
76