Closed noknokcody closed 4 years ago
Just realized that I'm supposed to get block data via get_field() not the actual data field on the block array.
Never forget that you can save mere minutes of "reading the manual" though hours of "quick debugging".
Describe the bug I'm not entirely sure if this is related to ACF Pro or ACF Extended but it appears that when setting up a block render callback that data passed to that callback is in an entirely different format when the render callback request is called via the block previewed (Ajax).
Here's what the data object looks like when my custom block is rendered on the front-end or when the previewed is loading:
Here's what the data object looks like when a block is rendered via ajax (After updating block settings in the previewer):
To Reproduce
Expected behavior I'd expect that the data passed to the callback function would be in the same kind-of format regardless of how the block is being loaded
WordPress & ACF WordPress version: 4.2.2 ACF Pro version: 5.8.6 ACF add-ons: none