Title: Threshold Cart Value
Last modified: August 22, 2016

---

# Threshold Cart Value

 *  [pjv](https://wordpress.org/support/users/pjv/)
 * (@pjv)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/threshold-cart-value/)
 * Hi, this great plugin is this >< close to letting me do exactly what a client
   wants for their shipping rules. The only thing I need to add is a threshold cart
   subtotal where above the threshold, the plugin does its thing and separates the
   shipping into classes and below the threshold it doesn’t do anything (i.e. it
   leaves the shipping in one group).
 * I’m about to start digging into the code and seeing if I can find where / how
   to put that logic in, but I thought I would first throw it out as a question 
   to the fine developer to see if A) you can give me any pointers on where in the
   code I might start looking, and B) if you think that feature would be useful 
   to add to the plugin with the inclusion of a field in the admin to specify the
   threshold.
 * [https://wordpress.org/plugins/multiple-packages-for-woocommerce/](https://wordpress.org/plugins/multiple-packages-for-woocommerce/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Bolder Elements](https://wordpress.org/support/users/hystericallyme/)
 * (@hystericallyme)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/threshold-cart-value/#post-5409834)
 * I’m sorry for the late response. I can definitely see where some conditions would
   be helpful. I will come up with a list of popular ones and determine a way to
   make it work.
 * In the meantime, it is definitely possible (if you haven’t figured it out already).
   The cart’s subtotal is actually nice and easy to obtain:
 * `$cart_subtotal = WC()->cart->get_cart_subtotal();`
 * Then in the primary plugin file, within the ‘generate_packages’ function, probably
   the first line break would be a good place to add the code (about line 55).
 *     ```
       //This line ensures only orders above $100 are split
       if( $cart_subtotal < 100 ) return;
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Threshold Cart Value’ is closed to new replies.

 * ![](https://ps.w.org/multiple-packages-for-woocommerce/assets/icon-128x128.png?
   rev=1627990)
 * [Multiple Packages for WooCommerce](https://wordpress.org/plugins/multiple-packages-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-packages-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-packages-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-packages-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-packages-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-packages-for-woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bolder Elements](https://wordpress.org/support/users/hystericallyme/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/threshold-cart-value/#post-5409834)
 * Status: not resolved