=== RM24 Reviews for Google ===
Contributors: agenturroth
Tags: google reviews, reviews, google business profile, rating, testimonials
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show the real Google reviews of your business (Google Business Profile) on your website – with rating summary, review cards, shortcode and block.

== Description ==

**RM24 Reviews for Google** shows the reviews of your Google Business Profile directly on your website instead of only linking to Google. Visitors see your average rating, the number of reviews and the latest review texts at a glance.

The data is loaded on your server through the official **Google Places API (New)** and cached. The API key is never sent to the browser, and the plugin makes no API requests from JavaScript.

= Features =
* **Rating summary:** average rating with stars, number of reviews, buttons "All reviews on Google" and "Write a review".
* **Review cards:** author name with profile link and photo, star rating, relative date ("2 months ago") and the review text with "Read more" for long texts.
* **Shortcode** `[rm24_google_reviews]` with the attributes `limit` (1–5), `min_rating` (1–5), `show_summary` (1/0) and `columns` (1–3).
* **Block** "RM24 Google Reviews" for the block editor with the same options and a live preview.
* **Cache:** the data is cached (default 12 hours, adjustable). If Google cannot be reached, the last valid data stays visible (for at most 30 days) and the error is shown in the admin area.
* **Reload now:** refresh the data with one click.
* **Lightweight and accessible:** own small stylesheet with CSS variables, a few lines of vanilla JavaScript, no jQuery. Styles and scripts are only loaded on pages that show reviews. Star ratings have text labels for screen readers.
* **Privacy option:** profile photos of the reviewers can be switched off.
* **Translations:** German (Switzerland, Germany – formal and informal), French and Italian. English is the base language.

= Important: at most 5 reviews =
Google provides **at most 5 reviews per place** through the Places API, selected by Google as the most relevant. It is technically not possible to load all reviews of a business with this API. The rating summary always shows the correct average rating and the total number of reviews.

= Google requirements =
As required by Google, the plugin shows the name and profile link (and photo) of each reviewer, the relative publication time, a visible "Reviews from Google Maps" attribution and a link to the place on Google Maps.

Google only allows Places content to be stored for a limited time. The plugin therefore keeps the data only as a temporary cache (1–168 hours) and deletes the fallback copy after 30 days at the latest. Only the Place ID is stored permanently.

The plugin deliberately does **not** output review schema markup (structured data). Google does not allow self-serving review markup with reviews taken from other sites and may treat it as spam.

= RM24 Reviews for Google PRO =
The separate PRO add-on (available at [rm24.ch](https://rm24.ch/produkt/rm24-reviews-for-google/)) adds a slider and a list layout, several locations, sorting, hiding reviews without text, design options and a compact rating badge. This free plugin is fully functional on its own.

= Trademark notice =
RM24 Reviews for Google is an independent plugin by RM24 | Roger Roth. It is not affiliated with, endorsed by or sponsored by Google LLC. Google, Google Maps and Google Business Profile are trademarks of Google LLC.

== Installation ==

1. Install the plugin through Plugins → Add New, or upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin.
3. In the Google Cloud Console, enable "Places API (New)" and create an API key that is restricted to this API (step-by-step guide on the settings page).
4. Go to RM24 → Reviews for Google, enter the API key and the Place ID of your business and save.
5. Add the shortcode `[rm24_google_reviews]` or the block "RM24 Google Reviews" to any page.

Optionally, the API key can be defined in `wp-config.php` instead of the database: `define( 'RM24RG_API_KEY', 'your-key' );`

== Frequently Asked Questions ==

= Why are only 5 reviews shown? =
The Google Places API returns at most 5 reviews per place. Google decides which reviews these are. All other reviews can be opened with the button "All reviews on Google".

= Does the API cost anything? =
Google charges for Place Details requests that include reviews, and includes a monthly free usage. Thanks to the cache, the plugin only makes a few requests per day for each place and language. Please check the current prices of the Google Maps Platform.

= Where do I find the Place ID? =
Use the Place ID Finder of Google (link on the settings page) and search for your business as it appears on Google Maps.

= The reviews are not shown. What can I do? =
Logged-in administrators see a short notice instead of the widget when something is missing. Open RM24 → Reviews for Google: the "Status and preview" section shows the last error message from Google. Common causes are a disabled "Places API (New)", missing billing in the Google Cloud project, or an API key restricted to websites (HTTP referrers) – the requests come from your server, so use an API restriction instead.

= Can I change the colors? =
Yes. The stylesheet uses CSS variables, e.g. `.rm24rg { --rm24rg-accent: #c00; --rm24rg-radius: 4px; }` in your theme's CSS. The PRO add-on offers design options in the settings.

= Does the plugin add review rich snippets? =
No, on purpose. See "Google requirements" above.

== External services ==

**Google Places API (New)** – This plugin connects to the Google Places API (`https://places.googleapis.com/v1/places/…`) to load the name, average rating, number of reviews, up to 5 reviews and the Google Maps link of the place you configured.

* What is sent and when: when the cached data is missing or expired (by default every 12 hours), when you click "Reload now", or when you open the settings page without cached data, your server sends the configured Place ID, your API key and the language code to Google. No data about your visitors is sent by the plugin.
* What is stored: the response (name, rating, number of reviews, reviews, Google Maps link) is cached in your WordPress database for the configured cache duration (1–168 hours). A fallback copy for outages is deleted after 30 days at the latest.
* When reviews are displayed with profile photos, the visitor's browser loads the reviewers' profile pictures directly from Google servers (e.g. `lh3.googleusercontent.com`); this transmits the visitor's IP address to Google. The photos can be switched off in the settings. Links to Google Maps and to the reviewer profiles only open Google when the visitor clicks them.
* The service is provided by Google LLC: [Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms), [Places API policies](https://developers.google.com/maps/documentation/places/web-service/policies), [Google Privacy Policy](https://policies.google.com/privacy).

**rm24.ch** – The RM24 overview page (RM24 → Overview) can show a list of further RM24 plugins. The list is only loaded after you click "Show more RM24 plugins". It is then requested from https://rm24.ch/plugin_updates/modules.json and cached for 12 hours. No data about your site or its visitors is sent; the request only contains the data every web request contains (such as your server's IP address). The service is provided by RM24 | Roger Roth: [Privacy policy](https://rm24.ch/datenschutzerklaerung/).

== Screenshots ==

1. Rating summary and review cards on the website.
2. Settings page with status and preview.
3. The block in the block editor.

== Upgrade Notice ==

= 1.0.1 =
The fallback copy of the Google data is now deleted after 30 days at the latest.

= 1.0.0 =
First release.

== Changelog ==

= 1.0.1 =
* Changed: the fallback copy that is shown when Google cannot be reached is deleted after 30 days at the latest (Google Maps Platform caching rules).
* Readme: trademark notice, caching and Places API policies in "External services".

= 1.0.0 =
* Initial release: Google reviews via the Places API (New) with cache and fallback, shortcode, block, settings page with status, preview and guide.
