Skip to content

Instantly share code, notes, and snippets.

@Zach-Toth
Zach-Toth / WooCommerce USPS Shipping Insurance
Last active Jul 30, 2020
Charge shipping insurance based on cart total with Woocommerce and USPS Simple Woo Plugin
View WooCommerce USPS Shipping Insurance
/**
* Add a shipping insurance surcharge to your cart / checkout
* change the insurance amount based on value of cart
* Uses the WooCommerce fees API
* Written for use with USPS Simple Woo Shipping plugin - Change $chosen_methods to your shipping methods
* Uses USPS shipping rates
* Based on Gist by MattRy
*
*/
You can’t perform that action at this time.