=== CCMS Shipping Insurance for WooCommerce ===
Contributors: ccmshightech
Donate link: https://www.ccmssolutions.com/
Tags: woocommerce, shipping insurance, checkout, insurance fee, declared value
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 6.0
WC tested up to: 11.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers add optional shipping insurance at checkout, priced by declared value with editable USPS, UPS and FedEx rate tables.

== Description ==

**CCMS Shipping Insurance for WooCommerce** adds an optional "Add shipping insurance" choice to your cart and checkout. When a customer adds it, a fee is added to the order, priced from the value of the goods and the carrier of the shipping method they picked. Developed by **Complete Content Management Services™** ([ccmssolutions.com](https://www.ccmssolutions.com/)).

= What it does =

* **Yes/No choice** on the **Cart and Checkout blocks** and on the classic cart and checkout, only when the order needs shipping.
* **Carrier-based pricing.** The carrier is read from the shipping method name (USPS, UPS or FedEx), with a default carrier when the name does not mention one.
* **Three ways to price each carrier:** an editable rate table (bands by declared value), a percentage of the declared value, or a fixed amount per order. The declared value is the value of the items that ship, before tax and shipping.
* **Minimum and maximum charge** for every carrier. They only apply to insurance that has a charge, so a "no charge" band stays free.
* **Choose when it is offered:** a minimum order value and a maximum insured value. Outside the range there is no choice and no fee. It is never offered for Local pickup, virtual-only or free orders.
* **Choose where it appears:** after the shipping options, above the order total, or above the Place order button on the classic checkout; with the shipping options or in the order summary on the blocks.
* **Insurance terms link:** point customers to a page that explains what the cover includes.
* **You choose the starting state** — insurance is only added when the customer picks it, unless you turn on "added by default" (some regions do not allow pre-selecting an extra paid option).
* **Decline message** you can edit, shown while insurance is declined, and a note on the order when a customer declines.
* **Order details** saved on every order: choice, carrier, declared value and cost, shown on the admin order screen and in order emails.
* **Insured Orders screen** with totals (insured, declined, take-up, fees collected), filters by choice, carrier and date, and a **CSV export** that is safe to open in a spreadsheet. An **Insurance column** is added to the WooCommerce orders list.
* **Taxable or not**, your choice.
* **Developer filters** for the declared value, cost and carrier.
* **High-Performance Order Storage** compatible. **Clean uninstall** — settings are removed when you delete the plugin.

= Important =

This plugin does not sell or underwrite insurance. It collects an optional fee so your customers pay for the cost of covering their shipment. You buy the coverage from the carrier or a third-party insurer and handle any claim. The rates it ships with are examples, not official carrier prices: set them to what your coverage actually costs you.

= Cart and Checkout blocks =

The choice appears in the order summary of the Cart and Checkout blocks without editing the page, and in the shipping section of the classic `[woocommerce_cart]` and `[woocommerce_checkout]` shortcodes. On the blocks, a fee is only added once the choice has loaded on the customer's screen, so nobody is charged for something they were not shown.

USPS, UPS and FedEx are trademarks of their respective owners. This plugin is not affiliated with or endorsed by them; the names are used only to describe the rate tables.

== Installation ==

1. Upload the plugin ZIP via **Plugins → Add New → Upload Plugin**, or copy the `ccms-shipping-insurance-for-woocommerce` folder to `wp-content/plugins/`.
2. Make sure WooCommerce is active, then activate **CCMS Shipping Insurance for WooCommerce**.
3. Go to **WooCommerce → Shipping Insurance**. Set the label, default carrier and your rates on the Carrier Rates tab.
4. Add a product to the cart and open the cart or checkout to see the choice.

== Frequently Asked Questions ==

= Does this plugin sell me actual insurance? =

No. It adds an optional fee to the order. You buy the coverage from the carrier or a third-party insurer, and you handle any claim.

= How is the price worked out? =

From the declared value (the value of the items that ship, before tax and shipping) and the carrier of the chosen shipping method, using the tables on the Carrier Rates tab.

= Are the rates official carrier prices? =

No. They are example starting values. Carrier and insurer prices change, so keep the tables up to date.

= Why do customers not see the option? =

It shows in the order summary of the Cart and Checkout blocks and in the shipping section of the classic checkout, when the order needs shipping, has something of value to insure, and is not Local pickup. Check that the value of the items that ship is inside the range on the Settings tab.

= Can insurance be added by default? =

Yes, on the Settings tab. It is off by default.

= Can I charge a percentage or a fixed fee instead of a rate table? =

Yes. On the Carrier Rates tab each carrier can use a rate table, a percentage of the declared value, or a fixed amount per order, with an optional minimum and maximum charge.

= Can I see which orders were insured? =

Yes. The Insured Orders tab lists every order where the customer was shown the choice, with totals and filters, and exports the list as a CSV file. The WooCommerce orders list also gets an Insurance column.

= Does it work with the Cart and Checkout blocks? =

Yes, on both the block and the classic cart and checkout. On the blocks, the fee is only added once the choice has appeared on the customer's screen.

= Can I use the insurance choice in other tools? =

Yes. The choice, carrier, declared value and cost are saved on every order, and developers can run their own code when they are saved with the `ccmssi_order_insurance_saved` action. CCMS also offers a separate add-on that connects the saved choice to ShipStation, EasyPost and Shippo.

= Does it work with High-Performance Order Storage? =

Yes.

= Does it slow down my site? =

No. It loads one small script and stylesheet only on the cart and checkout pages.

== External Services ==

This plugin does not contact any outside service while it runs on your store.

The only exception is an **optional newsletter sign-up** on the **About CCMS** tab of the plugin's settings screen. It sends nothing unless a site administrator types an email address, ticks the consent checkbox and clicks **Subscribe**. When they do, the plugin sends that email address, the site's URL and the plugin name to `https://www.ccmssolutions.com/api/newsletter-subscribe.php`, run by Complete Content Management Services, so CCMS can email product updates. Privacy policy: https://www.ccmssolutions.com/privacy-policy/ — Terms: https://www.ccmssolutions.com/terms/

== Screenshots ==

1. Settings tab — label, default carrier, starting choice, placement, offer limits, terms link and tax.
2. Carrier Rates tab — a rate table, percentage or fixed amount for each carrier, plus minimum and maximum charge.
3. The insurance choice on the Checkout block.
4. The insurance choice on the classic checkout.
5. Insured Orders tab — totals, filters and CSV export.
6. Insurance details on the admin order screen.

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
