Set dynamic also correctly for products

[MAILPOET-4883]
This commit is contained in:
David Remer
2023-01-25 08:33:17 +02:00
committed by Aschepikov
parent eef47c5bfb
commit f60ae7a8ef

View File

@ -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(