Update block attributes from front-end
-
Hello,
I didn’t find any way if it’s possible to update the block attributes from the front-end (via PHP or Ajax).
The block is a custom dynamic block that has some API data rendered in, I’d like to cache the result of API into the block attributes when it becomes available (hence, I can’t do this from the editor when creating the block).
For now, the only possible solution I see is to replace the block HTML comment string with a new string and save the new post content via AJAX. Is there any native function to save the new attribute to the block when it’s rendered?
Thank you,
Oksana
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Update block attributes from front-end’ is closed to new replies.