# Prices in BGN and EUR (WordPress Plugin)

[![WordPress Plugin](https://img.shields.io/badge/WordPress%20Plugin-View%20page-blue?style=flat-square&logo=wordpress)](https://wordpress.org/plugins/prices-in-bgn-and-eur/)

**Contributors:** rezored  
**Tags:** woocommerce, bgn, euro, currency, prices  
**Start Version:** 1.0  
**Current Version:** 1.8.10  
**License:** GPLv2 or later  

## Description

**Legal requirement from 1 August 2025:**  
All online stores in Bulgaria must display their prices in both BGN and EUR.

This lightweight plugin automatically adds the secondary price display alongside your main prices, using the fixed BNB exchange rate (1 EUR = 1.95583 BGN).

### How It Works:
*   **If your store is in BGN:** The plugin displays the calculated price in **EUR**.
*   **If your store is in EUR:** The plugin displays the calculated price in **BGN** (Leva).
*   **Settings Control:** If you turn the setting **OFF**, only one price (your current store currency) will be shown.

### Features
- ✅ Automatic EUR price calculation from BGN  
- ✅ **Bulk Price Converter:** Safely convert your entire catalog to EUR (Settings -> Price Converter).
- ✅ Uses fixed BNB exchange rate: 1 EUR = 1.95583 BGN  
- ✅ Works on all key pages and emails  
- ✅ Zero configuration required (works out of the box)  
- ✅ **Secure:** Uses a dedicated remote API for reliable mass conversion.

## Installation

1.  Upload the plugin folder to `/wp-content/plugins/`.
2.  Activate it from the **Plugins** menu in WordPress.
3.  That’s it – the plugin works immediately!

## Changelog

**1.8.10**
* FIX: Resolved issue with duplicate display of secondary currency in WooCommerce blocks (Cart/Checkout) caused by nested targeted elements.

**1.8.9**
* FIX: Resolved issue with duplicate display of secondary currency in WooCommerce cart/checkout totals correctly identifying CSS classes 'amount-eu' and 'amount-bgn'.

**1.8.8**
* FIX: Resolved issue where "Select All Global" logic was skipping pages with previously converted products.

**1.8.7**
* HOTFIX: Fixed license key validation issue caused by whitespace.

**1.8.6**
* NEW: Added color customization for secondary prices in settings.
* FIX: Removed all hardcoded color references for secondary currency display.

**1.8.5**
* FIX: Made the "Pro Version" admin notice permanently dismissible (saves to user preferences).

**1.8.4**
* HOTFIX: Resolved "undefined variable" error in display logic.

**1.8.2**
* FIX: Enforced price display order: EUR is always primary, BGN is secondary in brackets.

**1.8.1**
* NEW: Bulk Price Converter Tool - Convert your entire catalog from BGN to EUR with one click.
* NEW: Secure Remote API - Uses a dedicated microservice for safe, reliable conversion without timeouts.
* NEW: Safety First UI - Unified "Risk Acceptance" alert processing.
* NEW: Price Display Update - Now shows "EUR (BGN)" to prioritize the future currency.

**1.7.1**
* Tested up to WordPress 6.9
* Refined EUR to BGN support (Bidirectional)
* Added "Support me" link in Plugins list

**1.6.0**
* CRITICAL FIX for duplicate EUR prices

**1.5.0**
* Improved compatibility with WooCommerce Blocks

## Support

If you find this plugin useful, please consider buying me a coffee!  
[https://buymeacoffee.com/rezored](https://buymeacoffee.com/rezored)
