Skip to content

BUG: Meta filter block isn’t working when added via code. #4193

@burhandodhy

Description

@burhandodhy

Describe the bug

When calling the Meta Filter block directly in code like this do_blocks( '<!-- wp:elasticpress/facet-meta {"facet":"affiliate","displayCount":true} /-->' ) the block doesn’t work.

It seems the block depends on WP_Widget_Block to fetch the list of meta, so when inserted directly via code, it fails to render properly.

The same issue exists on the Meta Range Filter.

Steps to Reproduce

Add the Meta Filter via code and check if it works

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions