I am using WPAPI and ACF to edit some ACF field ON COMMENTS.
I cannot update an ACF fields just for COMMENTS.
Using fields{ fieldscustomname:’thevalue’} works for everythings except for comments.
const wp = new WPAPI({
endpoint: 'CORRECTENDPONT',
username: 'USER',
password: 'PSW',
auth: true
});
wp.comments().id(req.params['idComment']).embed()
.update({
author_url: 'test', //THIS WORKS
fields:{
mycostumfield: 'test' //this is NOT WORKING
}
})
.then(tData => {
res.status(200).send({
"data": tData
});
})
Thanks
I have the same problem~
Trying to add custom fields to comments, I can read the custom fields but does not seem to write them back. After some testing, this problem seems to be happened only for comments custom fields, but not for posts & pages.
Looking forward the solution~