admin管理员组文章数量:1125467
I'm creating a plugin and I have added a custom settings panel in the editor sidebar. In my settings panel I have a couple of text inputs and a custom button that calls an endpoint to pass some data to my php using @wordpress/api-fetch. When the post is updated, the values of the fields are populated in custom post metas, but the problem is that if I change the inputs, the post meta is not updated until I manually update the post and therefore when I pass my data to the endpoint, my php gets the previous field values.. Is there a way to force post update before the call to the endpoint when that custom button is clicked?
本文标签: pluginsForce post update with React
版权声明:本文标题:plugins - Force post update with React 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736668047a1946768.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论