From ed4a90f68e0f8354e29123b5f9a91be3d717c8a0 Mon Sep 17 00:00:00 2001 From: Krzysztof Grabania Date: Tue, 24 Sep 2024 13:51:35 +0200 Subject: [PATCH] fix: add filter to repeater field API that allows replacing notification instance for value resolver --- src/Api/Controller/RepeaterController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Api/Controller/RepeaterController.php b/src/Api/Controller/RepeaterController.php index 095c9b89..ba0f2695 100644 --- a/src/Api/Controller/RepeaterController.php +++ b/src/Api/Controller/RepeaterController.php @@ -102,7 +102,13 @@ public function formFieldData($data = null) */ public function getValues($postId, $carrier, $field) { - $notification = Db::postToNotification($postId); + $notification = apply_filters( + 'notification/field/repeater/notification_instance', + Db::postToNotification($postId), + $postId, + $carrier, + $field + ); if (! $notification instanceof Notification) { return [];