=== Technical Himanshu Payment Fees ===
Contributors: technicalhimanshu
Tags: payment fee, handling fee, checkout fee, payment gateway fee, gateway fee
Requires at least: 5.6
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add fixed or percentage‑based handling fees to WooCommerce payment gateways – no coding required.

== Description ==

Technical Himanshu Payment Fees is a lightweight WooCommerce extension that allows store owners to add custom handling or processing fees based on the selected payment gateway. No coding required – configure everything from your WordPress admin.

= Key Features =

* **Multiple Payment Gateway Fees** – Assign unique fees to any active payment gateway (PhonePe, COD, Bank Transfer, PayPal, Stripe, and more).
* **Flexible Fee Types** – Choose between **percentage** or **fixed** fees.
* **Custom Fee Name** – Display a custom label on the checkout page (e.g., "Handling Fee", "Processing Fee", "COD Charge").
* **Currency Control** – Apply fees to **all currencies** or restrict to a **specific currency**.
* **Tax Support** – Optionally make the fee taxable – WooCommerce automatically applies store taxes.
* **Payment Gateway Switching** – When customers switch payment methods, fees are updated dynamically – no duplicate fees.
* **Zero Duplicate Fees** – Fees are added once per cart calculation, even during AJAX updates.
* **Classic Checkout Compatible** – Works with the traditional WooCommerce checkout.
* **Checkout Block Compatible** – Fully integrated with the WooCommerce Checkout Block.
* **HPOS Ready** – Declared compatible with High‑Performance Order Storage.
* **Currency‑Switcher Friendly** – Detects the active checkout currency automatically.
* **Lightweight & Performance‑Focused** – No unnecessary assets, no bloat.
* **Zero External Dependencies** – No tracking, no telemetry, no external APIs – everything runs locally on your site.

= How It Works =

1. Activate the plugin.
2. Go to **WooCommerce → Payment Fees**.
3. Click **Add Payment Fee**.
4. Select a gateway, enter a fee name, choose a fee type (percentage or fixed), set the amount, and select currency preferences.
5. Save – done!

When a customer selects the configured gateway during checkout, the fee is automatically added to the cart total. If they switch to a different gateway, the fee updates or disappears accordingly – no manual intervention required.

== Installation ==

= Manual Installation =

1. Upload the `technical-himanshu-payment-fees` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Navigate to **WooCommerce → Payment Fees**.
4. Click **Add Payment Fee** and configure your first rule.
5. Save and test on your checkout page.

= Automatic Installation =

1. Go to **Plugins → Add New** in your WordPress admin.
2. Search for **Technical Himanshu Payment Fees**.
3. Click **Install Now** and then **Activate**.
4. Follow the steps above to add your first fee rule.

**Note:** WooCommerce must be installed and active for the plugin to work.

== Frequently Asked Questions ==

= Which payment gateways are supported? =

All active WooCommerce payment gateways are automatically detected and listed in the settings. This includes PhonePe, COD, Bank Transfer, Check Payments, PayPal, Stripe, Razorpay, and any other WooCommerce-compatible gateway.

= Can I apply a fee to all currencies? =

Yes. When adding a fee rule, choose **"All currencies"** to apply the fee regardless of the current checkout currency.

= Can I restrict a fee to a specific currency? =

Yes. Select **"Specific currency"** and choose the desired currency from the dropdown. The fee will only apply when the customer's current checkout currency matches.

= Does the plugin work with multi‑currency plugins? =

Yes. The plugin uses WooCommerce's active currency at the time of calculation. Most currency switchers update WooCommerce's active currency, so the fee will apply correctly.

= What happens if a customer switches payment gateways? =

The fee is updated dynamically. If the new gateway has a fee rule, it applies; if not, the fee is removed. Old fees are never carried over.

= Will the fee be duplicated if the cart recalculates? =

No. The fee is added only once per cart calculation, even during AJAX updates. Duplicate fees are prevented.

= Is the Checkout Block supported? =

Yes. The plugin integrates seamlessly with the WooCommerce Checkout Block.

= How do I set up a percentage fee? =

When adding a fee rule, select **"Percentage"** as the fee type and enter the percentage amount (e.g., `3` for 3%).

= How do I set up a fixed fee? =

Select **"Fixed"** as the fee type and enter the fixed amount (e.g., `50` for ₹50.00).

= Does the fee apply before or after coupons? =

The fee is calculated based on the cart subtotal (before coupons by default). Coupons do not affect the fee calculation in v1.0.

= What happens if I disable a fee rule? =

Disabled rules are ignored during checkout. You can re‑enable them at any time.

= Can I make the fee taxable? =

Yes. Check the **"Apply tax to this fee"** option when adding or editing a rule. WooCommerce will handle tax calculations based on your store settings.

= Will this work with my theme? =

Yes. The plugin uses standard WooCommerce hooks and works with any WooCommerce‑compatible theme.

= Does this plugin collect any personal data? =

No. This plugin does not collect, store, or transmit any personal data. It works entirely locally on your WordPress site.

= Is there a premium version? =

No. This is a completely free plugin. We believe in keeping it simple and accessible for everyone.

= How can I get support? =

Visit the [WordPress.org support forum](https://wordpress.org/support/plugin/technical-himanshu-payment-fees/) for help. We respond to all queries within 24‑48 hours.

== Screenshots ==

1. Plugin Menu & Quick Access Button.
2. Settings Page and + Add Payment Fee Button.
3. Adding or editing a fee rule.
4. Help & Documentation Page.
5. The main settings page listing all fee rules.
6. The fee displayed on the checkout page.

== Changelog ==

= 1.0.0 =
* Initial release
* Add multiple payment gateway fee rules
* Support for percentage and fixed fees
* Currency control (all currencies or specific)
* Taxable fee option
* Classic checkout and Checkout Block compatibility
* HPOS compatibility
* Currency‑switcher friendly
* Translation ready

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade required.

== Privacy ==

This plugin does not collect, store, or transmit any personal data. It works entirely locally on your WordPress site and does not interact with any external services.