Overview
mam-reviews-manager registers three content section types that you can place on a listing detail screen. They are injected into the content-section list (and the configurator prototypes) via mam_content_sections / mam_content_sections_prototypes, and each is built by its own mam_content_section_* filter.
| Section type | Purpose |
|---|---|
reviews_header |
Summary card: overall average, total count, latest date, rating distribution, per-criterion averages |
reviews |
The list of reviews (including the current user’s own, grouped) |
add_review |
The form for submitting a review |
Reviews are now always a content section — there is no separate tab-bar review form. Drop the sections you want onto the listing screen and they render inline.
Every section’s data comes from the provider that owns the post, so what the app shows always matches the native web store.
reviews_header — summary
Returns aggregate rating data for the card at the top of the reviews area.
{
"title": "Reviews",
"type": "reviews_header",
"show_title": "yes",
"content": {
"display_type": "stars", // "stars" | "numeric" (from the Reviews setting)
"overall_average": 4.3,
"total_ratings": 87,
"latest_review_date": "1717286400",
"distribution": { "5":40, "4":30, "3":10, "2":5, "1":2 },
"per_criterion": [
{ "id": "cleanliness", "label": "Cleanliness", "average": 4.5, "type": "star", "max": 5 }
]
}
}
distributionis the overall 1–5 histogram and is always present.per_criterionis populated only for multi-criteria providers (GeoDirectory with the Review Rating Manager). Single-star providers return an empty array.
reviews — the list
Returns the normalized review list. The current user’s own reviews are grouped under the “My Reviews” label; everyone else’s under the reviews title.
Each review:
{
"id": 456,
"user_id": 12,
"my_review": "no", // "yes" if authored by the current user
"reviewer": "Jane D", // "My Review" when my_review = yes
"content": "Great place",
"date": "Jun 02, 2026",
"datestamp": "1717286400",
"overall_stars": 4,
"ratings": [
{ "id": "cleanliness", "label": "Cleanliness", "value": 5, "type": "star", "max": 5 }
],
"photos": [ { "src": "https://…", "aspect": 1.5 } ]
}
ratings carries one entry per criterion (a single overall entry for single-star providers).
add_review — the form
Returns the configuration the app needs to render the submit form. Reviews are add-only — there is no edit mode; each submission inserts a new review.
{
"title": "Add a Review",
"type": "add_review",
"show_title": "yes",
"content": {
"action": "add",
"post_id": 123,
"require_login": "yes", // from the Reviews setting
"allow_photos": "yes", // from the Reviews setting
"criteria": [
{ "id": "overall", "label": "Overall", "type": "star", "max": 5, "required": true, "display_order": 0 },
{ "id": "cleanliness", "label": "Cleanliness", "type": "star", "max": 5, "labels": ["Terrible","Poor","Average","Very Good","Excellent"], "display_order": 1 }
],
"has_tip": "yes", // WooCommerce orders only (unchanged tipping behavior)
"order_total": "42.00"
}
}
The app renders one rating row per entry in criteria. For single-star listings that’s just overall; for a multi-criteria GeoDirectory post type it’s overall plus each configured dynamic, in display_order.
When the user has already reviewed the post, the form is replaced with a read-only card showing their submitted review (and a pending note if it is awaiting approval).
Multi-faceted (multi-criteria) reviews
A “criterion” is one thing being rated. Every provider exposes at least the reserved overall criterion. The GeoDirectory provider adds one criterion per row configured in the GeoDirectory Review Rating Manager that applies to the listing’s post type (e.g. Cleanliness, Food Quality, Service), reading the label, star-vs-numeric style, star labels, and display order straight from GD’s own configuration. That means the criteria the app shows are exactly the ones the website shows — configure them once in GeoDirectory and both surfaces follow.
type per criterion is resolved the same way everywhere: the input is always a 1–5 selector; star renders glyphs, numeric renders a number badge. max is always 5 in v1.
Submission payload (app → server)
The app submits to mam-main’s AJAX dispatcher with subaction mam_submit_review and a JSON body:
{
"post_id": 123, // or "order_id" for Woo order reviews (accepted for back-compat)
"review_text": "Great place",
"ratings": { "overall": 4, "cleanliness": 5 }, // legacy "review_stars": 4 also accepted
"photos": [ 9981 ], // temp attachment ids from the forms image uploader
"tip_amount": 0, "tip_level": 0
}
The response includes pending (true when the review awaits approval) and refreshed jsonData.
Related articles
- Plugin: mam-reviews-manager
- How reviews are stored and read (provider model)
- Configure the Reviews settings screen
Metadata
| Field | Value |
|---|---|
| Article type | Reference |
| Plugin slug | mam-reviews-manager |
| Applies to plugin version | 26.23.0+ |
| Category | Plugin Reference |
| Audience | App builder, PHP developer |
| Last verified | 2026-06-04 |
