simplenews_mailjet_subscriptions: added rules action to respond to unsubscribe webhook, drupla logger notice
This commit is contained in:
parent
8ac394cff0
commit
a528b89949
|
@ -303,7 +303,7 @@ index 98342b5..f67ba96 100644
|
||||||
'#type' => 'submit',
|
'#type' => 'submit',
|
||||||
diff --git a/src/Plugin/RulesAction/UnsubscribeFromList.php b/src/Plugin/RulesAction/UnsubscribeFromList.php
|
diff --git a/src/Plugin/RulesAction/UnsubscribeFromList.php b/src/Plugin/RulesAction/UnsubscribeFromList.php
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..c6a5a77
|
index 0000000..b880ed2
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/Plugin/RulesAction/UnsubscribeFromList.php
|
+++ b/src/Plugin/RulesAction/UnsubscribeFromList.php
|
||||||
@@ -0,0 +1,49 @@
|
@@ -0,0 +1,49 @@
|
||||||
|
@ -347,7 +347,7 @@ index 0000000..c6a5a77
|
||||||
+ protected function doExecute(integer $listID, string $email) {
|
+ protected function doExecute(integer $listID, string $email) {
|
||||||
+ $l = $listID;
|
+ $l = $listID;
|
||||||
+ $e = $email;
|
+ $e = $email;
|
||||||
+ \Drupal::logger('simplenews_mailjet_subscriptions')->info("Unsubscribe webhook triggered for listID: " . $listID . ", and email: " . $email . ".");
|
+ \Drupal::logger('simplenews_mailjet_subscriptions')->notice("Unsubscribe webhook triggered for listID: " . $listID . ", and email: " . $email . ".");
|
||||||
+ // find corresponding simplenews list from mailjet listID
|
+ // find corresponding simplenews list from mailjet listID
|
||||||
+
|
+
|
||||||
+ // get subscriber entity
|
+ // get subscriber entity
|
||||||
|
|
Loading…
Reference in New Issue