===  Pi Handling Fee for WooCommerce  ===
Contributors: rajeshsingh520
Tags: handling fee, woocommerce handling fee
Requires at least: 6.0
Tested up to: 7.0
Stable Tag: 1.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Handling Fee for WooCommerce plugin allows you to add handling fees based on various conditions in your WooCommerce store.

== Description ==

Handling fee for woocommerce plugin allows store owners to add flexible handling fees to orders based on various conditions. Support both fixed and percentage-based fees, with options to target specific product categories or entire cart subtotals. Features optional (checkbox) or mandatory fee modes, and is compatible with both classic and block-based checkout experiences.

== Features ==

* Flexible fee types — Support for fixed amount fees and percentage-based fees
* Multiple calculation methods:
  * Fixed amount added to cart
  * Percentage of cart subtotal
  * Percentage of specific product categories
* Conditional application — Apply fees to specific product categories or entire cart
* Checkout mode options:
  * Optional fees (checkbox) — Customers can choose to add the fee
  * Mandatory fees — Fees automatically added to all orders
* Checkout compatibility — Works with both classic checkout and block-based checkout
* Tax settings — Configure fees as taxable or non-taxable
* Easy administration — Admin settings page under WooCommerce menu for configuration
* HPOS compatible — Compatible with WooCommerce's High-Performance Order Storage

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Ensure WooCommerce is installed and activated.
4. Navigate to WooCommerce > Handling Fee to access the plugin settings.

== How to Use ==

Follow these steps to configure handling fees for your store:

=== Step 1: Access Plugin Settings ===
* Go to your WordPress Dashboard
* Navigate to **WooCommerce > Handling Fee**
* You'll see the Handling Fee Configuration page with multiple sections

=== Step 2: Configure Handling Fee Type ===

**Make Handling Fee Optional** toggle:
* **ON (Optional)** — Customers see a checkbox at checkout to add the fee manually
* **OFF (Mandatory)** — Handling fee is automatically added to all orders
* Enter a title under "Optional Fee Selection Title" (e.g., "Add Handling Service")

=== Step 3: Choose Fee Calculation Method ===

Select how the fee should be calculated:

* **Fixed Amount** — Add a flat fee (e.g., $5.00)
* **Percentage of Cart Subtotal** — Fee is a percentage of the entire cart (e.g., 5%)
* **Percentage of Specific Categories** — Fee is a percentage of selected product categories only (e.g., 10% on "Clothing")

=== Step 4: Set Target Categories (Optional) ===

If using **Percentage of Specific Categories**:
* Check the "Apply Handling Fee for Specific Categories" section
* Select the product categories where the fee applies
* Only items in selected categories will count toward the fee calculation
* Leave empty to apply the fee to all products

=== Step 5: Configure Fee Details ===

* **Handling Fee Amount / Percentage** — Enter the fee value (number only)
* **Handling Fee Title** — Set a display name for the fee at checkout (e.g., "Handling Fee", "Service Charge")

=== Step 6: Set Tax Configuration ===

* **Tax Status** — Choose whether the handling fee is:
  * **Taxable** — Tax will be applied to the fee amount
  * **Non-Taxable** — Fee is exempt from taxes
* **Tax Class** — Select the appropriate tax rate class if fee is taxable

=== Step 7: Save Settings ===

* Click the **Save Settings** button at the bottom
* A success message will confirm your settings are saved

== Usage Examples ==

=== Example 1: Optional 5% Handling Fee on All Products ===
1. Enable "Make Handling Fee Optional"
2. Set Fee Type to "Percentage of Cart Subtotal"
3. Enter 5 in "Fee Amount / Percentage"
4. Enter "Handling Fee" in "Handling Fee Title"
5. Set Tax Status to "Taxable"
6. Save Settings
* Result: Customers see an optional checkbox for a 5% fee on their cart subtotal

=== Example 2: Mandatory $10 Service Fee ===
1. Disable "Make Handling Fee Optional"
2. Set Fee Type to "Fixed Amount"
3. Enter 10 in "Fee Amount / Percentage"
4. Enter "Service Charge" in "Handling Fee Title"
5. Set Tax Status to "Non-Taxable"
6. Save Settings
* Result: A mandatory $10 fee is added to every order

=== Example 3: 8% Fee on Clothing Category Only ===
1. Enable "Make Handling Fee Optional"
2. Check "Apply Handling Fee for Specific Categories"
3. Select "Clothing" category
4. Set Fee Type to "Percentage of Specific Categories"
5. Enter 8 in "Fee Amount / Percentage"
6. Enter "Clothing Handling Fee" in "Handling Fee Title"
7. Save Settings
* Result: Customers see an optional 8% fee (calculated only on clothing items)

== Pro Version ==
For advanced features like conditional fees based on user roles, cart contents, or other criteria, consider upgrading to the (Pro Version)[https://www.piwebsolution.com/product/conditional-cart-fee-extra-charge-rule-for-woocommerce-extra-fees-pro/].

== Displaying Fees at Checkout ==

* **Classic Checkout** — Handling fee appears as a checkbox option in the checkout form
* **Block Checkout** — Handling fee displays in the order summary section
* Customers can see the fee title, amount, and tax details before completing their purchase

== FAQ ==

**Q: Can I change the fee after a customer completes their order?**
A: No. Fees are calculated at checkout time and locked into the order. Changes to settings apply only to future orders.

**Q: Can I apply different fees to different customer groups?**
A: For that you will need our (pro version)[https://www.piwebsolution.com/product/conditional-cart-fee-extra-charge-rule-for-woocommerce-extra-fees-pro/] of the plugin, which allows for advanced conditional logic based on user roles or other criteria.

**Q: How is the fee tax calculated?**
A: If set to "Taxable", the fee amount is multiplied by the selected tax rate, similar to product taxes.

