Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to enable usePostMeta in ACF Block #248

Closed
joseph-farruggio opened this issue Jun 4, 2024 · 8 comments
Closed

How to enable usePostMeta in ACF Block #248

joseph-farruggio opened this issue Jun 4, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@joseph-farruggio
Copy link

How can I enabled usePostMeta for ACF Blocks generated with the ACF Composer?

@Log1x
Copy link
Owner

Log1x commented Jun 4, 2024

@joseph-farruggio
Copy link
Author

joseph-farruggio commented Jun 4, 2024 via email

@Log1x
Copy link
Owner

Log1x commented Jun 4, 2024

oh i see, it needs to be in the acf key. https://www.advancedcustomfields.com/resources/save-acf-block-values-to-post-meta/

it needs a PR to go here for block.json but would need to source dive to see if it can be done when registered with PHP (not cached)

@Log1x
Copy link
Owner

Log1x commented Jun 4, 2024

looks like it can be done with use_post_meta when passed to settings for non-cached blocks. it would make sense to introduce a new $postMeta bool to enable this probably

@Log1x Log1x added the enhancement New feature or request label Jun 4, 2024
@joseph-farruggio
Copy link
Author

Is there a supported way of manually passing in use_post_meta from my block's controller?

@Log1x
Copy link
Owner

Log1x commented Jun 4, 2024

not in this case, but if you want to do a PR I can get it merged in and push a release. otherwise I can swing around to this sometime this week.

@Log1x
Copy link
Owner

Log1x commented Jun 5, 2024

Would you mind giving #249 a try when you get a chance?

@Log1x Log1x closed this as completed in 284c40b Jun 6, 2024
@joseph-farruggio
Copy link
Author

Sorry for the delay. This is what I needed. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants