update:
[PLUGIN DETAILS]Console Level……………………… : INFO (1)
Console Size………………………. : 375 KB
Database Version…………………… : 1.2
Last Migration Run…………………. : 2023-06-09 19:31:33
Merged Assets……………………… : No
Network Activated………………….. : No
Version…………………………… : 6.9.5 (5.13.2)
behaviour unchanged
The API documentation has an error. Here is the correct argument list for creating a review with the API:
Thank you , that solved the issue.
However:
- In what release was this implemented,
- what is the purpose of the “Require Approval For” configuration
The API hasn’t changed since it was released.
The create/update API routes bypass the Settings and they only perform basic review validation, the same is true for the helper functions. This is by design.
Trying to fully understand. This was the payload on “POST” to create review:
var postData = {
content: payloadObject.response.payload["Entrée du livre d'or"],
rating: payloadObject.response.payload["Comment évaluez-vous votre séjour"],
title: payloadObject.response.payload["Villa expérience one-liner"],
// 'assigned_posts': payloadObject["Name of property occupied"],
name: payloadObject.response.payload["Nom"],
date: villaNameTimestamp,
api: true,
assigned_posts: postIdFound
};Worked fine with “Require Approval” set to “unapproved”yes”
Now is_approved : 0 is required to create unapproved review.
var postData = {
content: payloadObject.response.payload["Entrée du livre d'or"],
rating: payloadObject.response.payload["Comment évaluez-vous votre séjour"],
title: payloadObject.response.payload["Villa expérience one-liner"],
// 'assigned_posts': payloadObject["Name of property occupied"],
name: payloadObject.response.payload["Nom"],
date: villaNameTimestamp,
api: true,
assigned_posts: postIdFound,
is_approved : 0
};So I guess we would like to know when the “is_approved” parameter was introduced.
is_approved was always a parameter in the REST API when creating a review, but it was missing from the documentation.
If the Require Approval setting worked before for the API then that was a bug which was likely at some point fixed.
Ah okay, thanks for your explanation and support!
rgds
