Support » Plugin: WooCommerce » How to make free shipping the only option after a set amount?

  • brashell

    (@brashell)


    On my site there is flat rate and free shipping option. When under 50 dollars there is only flat rate, when over 50 you get free shipping. Customers keep clicking the flat rate though, even though there is free shipping (when there order is over 50). Then I have to refund the order and its a nightmare. How can I make it so when there order is over 50 dollars the only option they have is free shipping and the flat rate button disappears? Where do I need to put the code? What is the code? I had someone do it for me with an older version, but since then, he well, died…. Thanks for the help – B

    http://wordpress.org/extend/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 19 total)
  • brashell

    (@brashell)

    BTW it is the newest version of woo

    dontforgetmario

    (@dontforgetmario)

    I think this extensions can solve your free shipping problem:

    http://www.woothemes.com/products/table-rate-shipping-2/

    http://www.woothemes.com/products/per-product-shipping/

    If you need any help…

    Cheers
    Mario

    RyanWheaton

    (@ryanwheaton)

    do you know if the Per Product Shipping interferes with an already running UPS calculator? THanks!

    thecookiemonster

    (@thecookiemonster)

    Yo brashell, i searched for the same answer not too long ago and only came up with a solution after i purchased the table rate pluggin…

    I found the solution in the woodoc’s pages some where. the quick and nasty is to add the following to your functions.php file.
    Works a treat.

    // Hide standard shipping option when free shipping is available
    add_filter( 'woocommerce_available_shipping_methods', 'hide_standard_shipping_when_free_is_available' , 10, 1 );
    
    /**
     *  Hide Standard Shipping option when free shipping is available
     *
     * @param array $available_methods
     */
    function hide_standard_shipping_when_free_is_available( $available_methods ) {
    
        if( isset( $available_methods['free_shipping'] ) AND isset( $available_methods['flat_rate'] ) ) {
    
            // remove standard shipping option
            unset( $available_methods['flat_rate'] );
        }
    
        return $available_methods;
    }
    brashell

    (@brashell)

    @thecookiemonster does it work with the new woo commerce?

    thecookiemonster

    (@thecookiemonster)

    I have not upgraded yet, my site is still in Dev. but no reason why it shouldnt work though.
    Worth a try, give it a bash!

    thecookiemonster

    (@thecookiemonster)

    Just tested after upgrade to Woo 203. Works A-ok!

    brashell

    (@brashell)

    what do I put the code in? The theme functions.php? or does woo commerce have one?

    thecookiemonster

    (@thecookiemonster)

    Copy n paste it into your Themes functions.php file

    brashell

    (@brashell)

    10,1 what is that?

    brashell

    (@brashell)

    NVM, Dude your freakin awesome, saved me 50 bucks paying some dude to do it. You program WordPress?

    Roy Ho

    (@splashingpixelscom)

    10 is the priority and 1 means 1 argument being passed.

    brashell

    (@brashell)

    ah, ok. TY

    thecookiemonster

    (@thecookiemonster)

    Glad to be of help.
    Spent hours looking for that fix….after i spent the 50 bucks on the pluggin.

    Hey,

    and there is a bug, however, if you adjust the cart (delete a few items to drop below the minimum amount), the free shipping option will stay there even if that is at the updated cart no longer valid 🙁

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘How to make free shipping the only option after a set amount?’ is closed to new replies.