=== Live Gold & Silver Prices – Precious Metals Widget ===
Contributors: effegweb
Tags: gold price, silver price, precious metals, live prices, compro oro
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display live gold and silver prices in €/gram with purity tables, auto-updated every 60 seconds. No paid API required.

== Description ==

**Live Gold & Silver Prices** is a professional WordPress plugin for gold buying agencies, jewelers and precious metals dealers.

It displays live gold and silver prices in €/gram with fully customizable purity tables showing your buy price for each karat — calculated automatically from your configured margin.

= Key Features =

* Live gold and silver prices in €/gram, auto-updated every 60 seconds
* Purity table for gold and silver (up to 3 rows each) with your buy price calculated from your margin
* Instant price trend indicator (▲ up / ▼ down / — stable) with colored pill background
* Light and dark theme with customizable accent color
* WordPress dashboard widget with current prices and trend
* Editable frontend texts from the backend settings panel
* Fully responsive and mobile-friendly
* GDPR friendly — no user data collected, no cookies set

= Shortcode =

`[prezzi_metalli]` — Displays the full widget with live gold and silver prices and purity tables.

= Data Sources =

Prices are fetched from **goldprice.org** (real-time USD/oz) and converted to EUR using the official ECB exchange rate from **frankfurter.app**.

Automatic fallback cascade — the widget never breaks:

1. goldprice.org — real-time gold and silver prices
2. fxratesapi.com — XAU/XAG rates natively in EUR
3. frankfurter.app (ECB rate) + updated commodity estimates
4. Static emergency values with visible notice

= External Services =

This plugin connects to the following external services to retrieve metal prices. Only server-side requests are made. No visitor data is transmitted.

* **goldprice.org** — real-time precious metals data. [Terms](https://goldprice.org/terms-conditions) | [Privacy](https://goldprice.org/privacy-policy)
* **fxratesapi.com** — EUR exchange rates. [Privacy](https://fxratesapi.com/legal/privacy-policy)
* **frankfurter.app** — ECB official exchange rates. Public service, no personal data sent.

= Privacy =

This plugin does not collect, store or transmit any visitor data. No cookies are set. Compatible with GDPR / CCPA requirements.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install directly from WordPress.org
2. Activate the plugin from the Plugins menu
3. Go to **💰 Gold & Silver** in the sidebar and set your buy margins
4. Add `[prezzi_metalli]` to any page or post

== Frequently Asked Questions ==

= How often are prices updated? =

The browser refreshes prices every 60 seconds (configurable from 30s to 5 minutes). The server caches data for 4 minutes to avoid overloading the free APIs.

= Do I need an API key or paid subscription? =

No. The plugin uses only free public data sources. No registration or payment required.

= What if the server has no internet access? =

The plugin uses a 4-level fallback cascade. If all live sources fail, it shows static reference values with a visible notice. Your site never shows a blank widget or PHP error.

= Is it GDPR compliant? =

Yes. No visitor data is collected or transmitted. No cookies are set.

= Can I have more than 3 purity rows or add more features? =

Unlimited purity rows, price history chart, fullscreen display mode for in-store monitors and totems, weight calculator for customers, and email price alerts are available in the Pro version at [effegweb.it/compro-oro-plugin](https://effegweb.it/compro-oro-plugin).

= Which currencies are supported? =

Currently EUR. USD and GBP support is planned for a future release.

== Screenshots ==

1. Frontend widget — live gold and silver prices with trend indicators and purity tables (light theme)
2. Frontend widget — dark theme
3. Price trend pill — green for rising, red for falling, neutral for stable
4. Backend settings panel — General tab
5. Backend settings panel — Gold purity configuration
6. WordPress dashboard widget with live prices and trend

== Changelog ==

= 1.1.0 =
* Improved trend indicator with colored pill background (green/red/neutral)
* Fixed dark theme save bug
* Improved admin UI with bilingual labels
* Updated data sources and EUR fallback rate
* WordPress 6.9 compatibility

= 1.0.0 =
* Initial release
* Live gold and silver prices from free public sources with 4-level automatic fallback
* Purity tables for gold and silver (max 3 rows each) with configurable margins
* Trend indicator with colored pill — visible from first page load
* Light and dark themes, customizable accent color
* WordPress dashboard widget
* Editable frontend texts from backend

== Upgrade Notice ==

= 1.1.0 =
* Improved trend indicator with colored pill background (green/red/neutral)
* Fixed dark theme save bug
* Improved admin UI with bilingual labels
* Updated data sources and EUR fallback rate
* WordPress 6.9 compatibility

= 1.0.0 =
Initial release.
