From f60ae7a8efa789f7ba3b489d372b0001c0baf06b Mon Sep 17 00:00:00 2001 From: David Remer Date: Wed, 25 Jan 2023 08:33:17 +0200 Subject: [PATCH] Set dynamic also correctly for products [MAILPOET-4883] --- mailpoet/lib/API/JSON/v1/AutomatedLatestContent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailpoet/lib/API/JSON/v1/AutomatedLatestContent.php b/mailpoet/lib/API/JSON/v1/AutomatedLatestContent.php index d38c9c1019..462ef636d8 100644 --- a/mailpoet/lib/API/JSON/v1/AutomatedLatestContent.php +++ b/mailpoet/lib/API/JSON/v1/AutomatedLatestContent.php @@ -93,7 +93,7 @@ class AutomatedLatestContent extends APIEndpoint { $posts = $this->getPermittedPosts($this->ALC->getPosts(new BlockPostQuery([ 'args' => $data, // If the request is for Posts block then we are fetching data for a static block - 'dynamic' => !(isset($data['type']) && $data['type'] === "posts"), + 'dynamic' => !(isset($data['type']) && in_array($data['type'], ["posts", "products"])), ] ))); return $this->successResponse(