PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.8.1
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.8.1
5.8.0 5.8.1 5.7.0 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 All 41 releases
double-opt-in / src / Events / Lifecycle / OptInReOptedInEvent.php

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

71 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * OptIn Re-Opted-In Event
4 *
5 * @package Forge12\DoubleOptIn\Events\Lifecycle
6 * @since 5.8.0
7 */
8
9 declare( strict_types=1 );
10
11 namespace Forge12\DoubleOptIn\Events\Lifecycle;
12
13 use Forge12\DoubleOptIn\EventSystem\Event;
14
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19 /**
20 * Dispatched when a withdrawn consent is given again (addon-opt-out's
21 * "reactivate" in the subscriber's list). The counterpart of
22 * {@see OptInOptedOutEvent}; fired only when the opt-in actually changed.
23 *
24 * @api Core API 4.6.0
25 */
26 class OptInReOptedInEvent extends Event {
27
28 /** @var int */
29 private $optInId;
30
31 /** @var string */
32 private $hash;
33
34 /** @var string */
35 private $email;
36
37 /** @var int */
38 private $formId;
39
40 public function __construct( int $optInId, string $hash, string $email, int $formId ) {
41 parent::__construct();
42 $this->optInId = $optInId;
43 $this->hash = $hash;
44 $this->email = $email;
45 $this->formId = $formId;
46 }
47
48 /**
49 * {@inheritdoc}
50 */
51 public static function getWordPressHookName(): string {
52 return 'f12_doi_optin_reopted_in';
53 }
54
55 public function getOptInId(): int {
56 return $this->optInId;
57 }
58
59 public function getHash(): string {
60 return $this->hash;
61 }
62
63 public function getEmail(): string {
64 return $this->email;
65 }
66
67 public function getFormId(): int {
68 return $this->formId;
69 }
70 }
71