Signature
do_action( 'mam_reviews_add_vendor_review', array $payload );
| Parameter | Type | Description |
|---|---|---|
$payload |
array |
The raw decoded request body from the app (includes order_id/post_id, review_text, ratings, and any tip fields). |
When it fires
Only when the reviewed post is a shop_order — i.e. an order review rather than a listing or product review. It fires after the review has been saved by the provider and before the generic mam_reviews_review_submitted hook, so order/vendor-specific handling (for example, processing a tip attached to the order) can run first.
For non-order reviews this hook does not fire; use mam_reviews_review_submitted for the general case.
Example
add_action( 'mam_reviews_add_vendor_review', function ( array $payload ) {
$order_id = (int) ( $payload['order_id'] ?? $payload['post_id'] ?? 0 );
$tip = isset( $payload['tip_amount'] ) ? (float) $payload['tip_amount'] : 0.0;
if ( $order_id && $tip > 0 ) {
// record the tip against the order / vendor payout
}
} );
Notes
- This hook receives the raw
$payloadonly (not the normalized submission); read tip fields from it directly. - Tipping UI is gated by the
mam_reviews_have_tips/mam_reviews_get_order_totalfilters; this hook is where the submitted tip is consumed.
Related articles
- Hook:
mam_reviews_review_submitted - How reviews are stored and read (provider model)
Metadata
| Field | Value |
|---|---|
| Article type | Hook Reference |
| Plugin slug | mam-reviews-manager |
| Applies to plugin version | 26.23.0+ |
| Category | Extending MAM Suite |
| Hook type | action |
| Audience | PHP developer |
| Last verified | 2026-06-04 |
