setAttributes doesn’t save attributes
-
Hi all,
I’m fairly new to working with Blocks. I have previously managed to make a plugin that changed my post’s meta values, however I’m now trying to make something a lot simpler and it’s just refusing to update the data in the backend.
You can find source code for my block here. It simply adds a toggle to set a meta value to false or true.
While the value to my attribute seems to change after calling:
setAttributes( { featured: value } );
If I save my post and check the rest api, the value actually won’t have changed.
I have absolutely no clue why this isn’t working. Is there anything wrong with the code?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘setAttributes doesn’t save attributes’ is closed to new replies.