Woocommerce – Bundle rate shipping free shipping for orders over $99 for regular post

Hi all thanks for reading,

I am currently trying to set the woocommerce bundle rate shipping up. I’ve added the secondary plugin everything work great! I just want to know how to set free shipping for orders over $99 only by regular post (not express)

Read More

So basically what happens right now is when an order is over $99 it gives the user the option to select express shipping for free.

Whats happening right now when an order is over $99:

  • Regular shipping (free)
  • Express shipping (free)

What I want to happen:

  • Regular shipping (free)
  • Express shipping ($13.95)

My hook:

add_filter( 'woocommerce_brs_shipping_total', 'franks_custom_woocommerce_brs_shipping_total_filter' );

function franks_custom_woocommerce_brs_shipping_total_filter( $shipping_total ) {
    global $woocommerce;

    // If there is more than $99 in the cart, set shipping to $0
    if ( $woocommerce->cart->cart_contents_total > 99 ) {
        return 0;
    } 

    // Otherwise, return the default shipping rate
    return $shipping_total;
}  

code taken from:

http://codecanyon.net/item/woocommerce-ecommerce-bundle-rate-shipping/1429243

Code example issue:

it’s just returning 0 if the cart total is over $99, I need to change the if condition to only apply to the “Regular shipping” option

Hope this helps making it clear to understand

Thanks

Related posts

Leave a Reply