Overview
Align the Reviews extension schema output with the approved Tour Operator Schema 2.0 mappings and fix the current Review schema defects.
Approved mapping source:
https://docs.google.com/document/d/1UVfrdgR1o2A-5YuyMbY6Bxevy3EXYfOkj-p6dwXFxMA/edit?tab=t.l9k66a4nq8kl
Current schema file:
https://github.com/lightspeedwp/to-reviews/blob/develop/classes/class-to-review-schema.php
Delivery Decision
- Create a new implementation branch from this repository's
update-2.2 branch.
- Keep this issue focused on Reviews schema only.
Scope
Update LSX_TO_Schema_Review so Review posts emit approved Review schema output without privacy leaks, invalid properties, or duplicate-key overwrites.
Tasks
Acceptance Criteria
Out Of Scope
- Tour, Accommodation, and Destination schema in the core Tour Operator plugin.
- Team schema updates.
- Specials schema updates.
Overview
Align the Reviews extension schema output with the approved Tour Operator Schema 2.0 mappings and fix the current Review schema defects.
Approved mapping source:
https://docs.google.com/document/d/1UVfrdgR1o2A-5YuyMbY6Bxevy3EXYfOkj-p6dwXFxMA/edit?tab=t.l9k66a4nq8kl
Current schema file:
https://github.com/lightspeedwp/to-reviews/blob/develop/classes/class-to-review-schema.php
Delivery Decision
update-2.2branch.Scope
Update
LSX_TO_Schema_Reviewso Review posts emit approvedReviewschema output without privacy leaks, invalid properties, or duplicate-key overwrites.Tasks
update-2.2for this work.@typeasReview.@idto a unique review hash, for example#/schema/review/{post_id}.$review_authorassignment.reviewer_nametoauthor.name.reviewer_emailfrom public JSON-LD output to avoid exposing guest email addresses.headline,datePublished,dateModified,commentCount,mainEntityOfPage, andreviewBodywhere valid.reviewRating.ratingValueto use the actual rating value.reviewRating.bestRatingto the scale maximum, expected5.reviewRating.worstRating, expected1.itemReviewedarray keys so tour and accommodation relationships are not overwritten.tour_to_reviewtoitemReviewednodes typed asTouristTrip.accommodation_to_reviewtoitemReviewednodes typed asLodgingBusiness.itemReviewedvalue without duplicate PHP keys.date_of_visit_start/date_of_visit_end; either emit a valid ISO 8601temporalCoverageinterval or map asadditionalPropertylabelledDate of Visit.reviewSectionoutput withaboutor remove it if no reliable mapping is available.spatialCoverageusingTouristDestination, not inconsistentCountry/Statetyping.urlfor the Review node.site_represents_referencewhere available.Acceptance Criteria
Reviewschema aligned with the approved mapping.reviewRatingusesratingValue,bestRating, andworstRatingcorrectly.TouristTrip; related accommodation usesLodgingBusiness.reviewSectionusage is removed or replaced with a valid mapping.Out Of Scope