Skip to content

Commit 636cb4b

Browse files
committed
Fix issue #49 Plumrocket\Amp... not found
1 parent 2b97dc0 commit 636cb4b

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

Block/Amp/Ldjson/PostList.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
/**
1212
* Blog post list ldJson block
1313
*/
14-
class PostList extends \Plumrocket\Amp\Block\Page\Head\Ldjson\Cms
14+
if (class_exists('\Plumrocket\Amp\Block\Page\Head\Ldjson\Cms')) {
15+
class PostListIntermediate extends \Plumrocket\Amp\Block\Page\Head\Ldjson\Cms {}
16+
} else {
17+
class PostListIntermediate extends \Magento\Framework\View\Element\AbstractBlock {}
18+
}
19+
20+
class PostList extends PostListIntermediate
1521
{
1622
/**
1723
* Retrieve page structure structure data in JSON

Block/Amp/Og/Post.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@
1212
/**
1313
* Blog post opengraph for amp
1414
*/
15-
class Post extends \Plumrocket\Amp\Block\Page\Head\Og\AbstractOg
15+
16+
if (class_exists('\Plumrocket\Amp\Block\Page\Head\Og\AbstractOg')) {
17+
class PostIntermediate extends \Plumrocket\Amp\Block\Page\Head\Og\AbstractOg {}
18+
} else {
19+
class PostIntermediate extends \Magento\Framework\View\Element\AbstractBlock {}
20+
}
21+
22+
class Post extends PostIntermediate
1623
{
1724
/**
1825
* Retrieve open graph params

0 commit comments

Comments
 (0)