=== MRN Nerkh ===
Contributors: mehran-mrn
Tags: woocommerce, gold, currency, dynamic pricing, iran
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Requires Plugins: woocommerce
Stable tag: 1.3.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Gold and currency rates for Iranian websites, with Persian rate boards and dynamic WooCommerce product pricing.

== Description ==

MRN Nerkh is a rate and pricing plugin for Iranian websites. It stores gold, coin, currency and crypto rates locally and calculates WooCommerce prices from a selected rate, quantity, multiplier, percentage and fixed adjustments. The administration interface is in Persian with RTL layouts. A Persian setup guide is included in guide-fa.txt.

[Product website](https://mrnwp.ir/mrnnerkh) | [MRNWP](https://mrnwp.ir) | [Source and issues](https://github.com/mehran-mrn/wp-price-engine)

= Features =

* Persian administration interface, rate assets and rate history.
* Manual rates, API providers, custom JSON and selected HTML rate sources.
* Scheduled refresh and administrator-triggered refresh; visitors read locally cached rates.
* Simple and variable WooCommerce product formulas, percentage and fixed adjustments, multipliers and rounding.
* Rial and toman conversion, and currency conversion using locally stored rate pairs.
* Cart price locks and order rate snapshots.
* Cards, tables and ticker rate boards with shortcodes and a Gutenberg block.
* Last-known rates on provider errors and configurable stale-rate handling.

External providers are disabled on new installations. An administrator must configure and enable each provider. Manual rates do not need an external service. Service fees, quotas, credentials and data reuse permissions depend on the selected provider; local plugin features do not have a license gate.

Developer: [Mehran Marandi](https://mehranmarandi.ir). Code and bundled artwork are distributed under GPLv3 or later. Provider reference attribution is included in NOTICE.txt. Readable PHP, JavaScript and CSS sources are included; no build step is needed.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin ZIP through Plugins > Add New > Upload Plugin.
3. Activate MRN Nerkh and open its Persian rate dashboard.
4. Create a manual rate or enable a provider after reviewing its service terms.
5. Configure the dynamic pricing tab in the WooCommerce product editor.
6. Display rates with the rate board block or `[mrn_price_board]`.

For upgrades from the development folder `mrn-price-engine`, deactivate that copy before activating the `mrn-nerkh` package. Database tables, settings, shortcodes, REST routes and the internal block name are retained. Do not uninstall the old copy with its delete-data option enabled when you want to keep your rates and settings.

== External services ==

Requests are sent only by scheduled or administrator-triggered refresh jobs for enabled providers. Rate boards and customer price calculations use local data. Requests may include asset symbols, base/quote currencies and the configured API key, token or account credentials for the selected service. Providers see the server IP and plugin User-Agent. The site URL is not sent in the User-Agent. Customer names, email addresses, billing details and order payloads are not sent to rate services.

The complete endpoint-domain inventory is included in services.txt. Legacy entries without a supported endpoint are retained for compatibility with existing settings and do not fetch rates.

* [Navasan](https://www.navasan.tech/) provides Iranian rates and requires service credentials.
* [CoinGecko](https://www.coingecko.com/en/api) provides crypto prices: [API terms](https://www.coingecko.com/en/api_terms), [privacy policy](https://www.coingecko.com/en/privacy).
* [Frankfurter](https://frankfurter.dev/) provides international reference exchange rates.
* [Metals.dev](https://metals.dev/) provides metal rates and requires an API key.
* [Nobitex](https://nobitex.ir/), [Wallex](https://wallex.ir/), [Bitpin](https://bitpin.ir/), [Ramzinex](https://ramzinex.com/), [Exir](https://www.exir.io/), [TetherLand](https://tetherland.com/) and [ArzPaya](https://arzpaya.com/) provide Iranian crypto market rates.
* [Milli](https://milli.gold/), [MelliGold](https://melligold.com/) and [TGJU](https://www.tgju.org/) are selected HTML rate sources. Page changes may stop parsing. Public page access does not grant commercial redistribution rights; review the source terms and permissions before enabling these sources.
* Custom JSON and TGJU Local connect to the HTTPS URL configured by the administrator. Configured query parameters and headers are sent to that destination.

Additional API adapters and their destination domains are listed in services.txt. Some require a paid account. No API access, data license or subscription is included with this plugin.

== Privacy ==

Asset definitions, rates, history, refresh logs and service settings are stored in the site's database. API keys and tokens are stored in WordPress options; restrict administrator and backup access. Product and order metadata store rate snapshots. Data deletion on uninstall is optional and disabled by default.

MRN Nerkh does not send usage statistics or store data to MRNWP or the developer. Display assets are local. The public REST endpoint exposes rate records and can be disabled in settings; it does not expose API keys or provider headers.

== Frequently Asked Questions ==

= Are rates real time? =

Refresh is periodic and depends on provider availability, the configured interval and WP-Cron execution. Review the last update time and stale-rate policy for an active store. Continuous provider access or a particular market rate is not guaranteed.

= Does it require a paid rate service? =

Manual rates work without a service. Providers offering public access can be used under their own terms. API fees, usage plans and quotas are set by the provider.

= Is the plugin intended for Iranian users? =

Yes. The interface and product documentation focus on Persian, gold, coins, rial and toman. International rate providers are available for currency conversion and crypto rates.

= Does the plugin handle tax compliance? =

The pricing formula is a calculation tool. Rates, units, adjustments, discounts and WooCommerce taxes must be configured and tested for the store's requirements.

= Where is the Persian guide? =

The installation package includes guide-fa.txt, covering setup, migration, privacy and provider usage in Persian.

== Screenshots ==

1. Persian rate dashboard and source status in a demonstration installation.
2. Gold, currency and asset management with sample rates.
3. A Persian rate board displayed on a site with sample data.

== Changelog ==

= 1.3.0 =
* Introduce MRN Nerkh branding, product page and developer information.
* Add the logo and WordPress menu icon.
* Disable external providers on fresh installations while keeping existing settings.
* Remove the site URL from request User-Agent headers and bound JSON response size.
* Align the translation domain and release folder with mrn-nerkh.
* Document services, privacy and GPLv3-or-later licensing.
* Fix rate board refresh with plain WordPress permalinks.
* Fit rate cards to narrow theme content areas and mobile layouts.

= 1.2.0 =
* Add rate discovery from Milli, MelliGold and TGJU pages.
* Keep the last valid rate when source parsing fails.

= 1.1.0 =
* Convert rates into the store currency using local rate pairs.
* Expand the provider catalog and configuration.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.0 =
The public name is MRN Nerkh. Existing rates and settings are retained. External providers on a fresh installation must be enabled by an administrator.
