=== CatCode Google Reviews ===
Contributors: catcodestudio
Tags: google reviews, reviews, testimonials, woocommerce, rating
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Google reviews and the star rating of your business on the site — a block, a shortcode and a Place ID that the plugin finds for you.

== Description ==

Reviews on Google are the ones buyers trust, and they are the ones your site usually does not show. Every plugin for this asks for a "Place ID" first — and that is where most shop owners stop, because finding it means digging through Google's ID finder demo and guessing which of the six identifiers is the right one.

This plugin asks for the business name instead. Type "Bakery Kolosok Kyiv", or paste the link to the place from Google Maps, press "Find" — and pick your business from the list Google itself returns.

= A Google API key is required =

Be clear about this before you install: the plugin needs a Google API key with "Places API (New)" enabled, and that key is **yours** — created in your own Google Cloud project, on your own billing account. CatCode does not hand out a key and does not route your traffic through us.

Without a key the plugin cannot add a business at all: only Google can turn a name or a Maps link into a Place ID. Reviews entered by hand are an addition to what Google returns for a place you already added — not a way to run the plugin with no key.

= How it works =

1. Paste your own Google API key on the settings screen. It stays encrypted in the database, and nothing is routed through us.
2. Find the business by name or by a Google Maps link. The Place ID, the address, the rating and the review count are filled in for you.
3. Put the "Google reviews" block on a page, or the `[catcode_google_reviews]` shortcode anywhere else.

Google is asked once per place per cache window (12 hours by default), not once per visitor — so a busy page costs the same as a quiet one, and the widget keeps working when Google is unreachable.

= What it shows =

* The rating line: the average, the number of ratings, and a "Write a review" button that opens the review form of your business
* Up to five reviews Google returns for a place, with the author's name, avatar, rating, text and date
* Reviews you entered by hand — an addition to Google's five, for a place you have already added
* A link to each review on Google Maps and a Google Maps attribution next to the block, as Google's policy requires

= What you get =

* One place
* The list layout, the block and the shortcode
* Reviews entered by hand
* Light, dark and automatic colour schemes, "Read more" for long reviews
* Cache window of your choosing

<!-- @pro-begin -->
= Pro =

* Any number of places — a chain, a showroom and a service point side by side
* Grid and slider layouts
* Filters: minimum rating, only reviews with text, stop words
* Automatic placement in WooCommerce: a product tab, a block under the product description, a block on the thank-you page
<!-- @pro-end -->

= Honest notes =

* The Places API returns at most **five** reviews for a place. That is Google's limit, not the plugin's — no plugin can show the sixth one, and anything promising otherwise is not using the official API.
* The API key is yours, and it is required. The plugin's own traffic is about two requests a day per place, which sits inside the free monthly allowance Google gives every key, but the billing account is still yours to watch.
* The plugin does **not** print review schema markup. Google's structured-data rules forbid marking up reviews collected from another platform, and doing it invites a manual action instead of stars in the search results.
* Google's terms allow keeping their content for 30 days at most, so the cache window is capped there and older content is dropped rather than shown.

== Installation ==

1. Install and activate the plugin.
2. Go to Settings → Google reviews.
3. Paste a Google API key with the "Places API (New)" enabled.
4. Find your business by name or by a Google Maps link.
5. Add the "Google reviews" block to a page, or the `[catcode_google_reviews]` shortcode to a template.

== Frequently Asked Questions ==

= Where do I get the API key? =

In Google Cloud Console: create a project, enable "Places API (New)", attach a billing account and create an API key. The settings screen links straight to the credentials page, and it tells you which of the three steps is missing when Google refuses a request.

= Does it cost money? =

Google gives every key a free monthly allowance per SKU. With one place and the default 12-hour refresh the plugin makes about two requests a day, which stays inside it. Reviews belong to the "Place Details Enterprise + Atmosphere" SKU, so check your Google billing if you run many places with a short cache window.

= Can it work without a Google API key? =

No. Adding a business needs a request to Google — a name or a Maps link only becomes a Place ID on Google's side. Once a place has been added, the widget keeps rendering from the cache and from reviews you typed in yourself, but a fresh install with no key cannot get past the first step.

= Can it show more than five reviews? =

Only by adding them by hand. The Places API returns five per place and there is no parameter to ask for more.

<!-- @pro-begin -->
= Can I hide bad reviews? =

Pro can hide reviews below a rating you choose. The rating line above them still shows the real average — hiding a review on your site does not change it on Google.

<!-- @pro-end -->
= Does it work without WooCommerce? =

Yes. WooCommerce is only needed for the automatic placements on the product and thank-you pages.

== Screenshots ==

1. The reviews block on a page.
2. Finding the business by name — no Place ID hunting.
3. The settings screen.

== Changelog ==

= 1.0.0 =
* First release: Place ID search by name or Google Maps link, cached Place Details, block and shortcode, manual reviews, light/dark themes, Google attribution.
<!-- @pro-begin -->
* Pro: several places, grid and slider layouts, filters, WooCommerce placements.
<!-- @pro-end -->
