WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
WooCommerce and minimum limit for Local Delivery (7 posts)

  1. tapaninaho
    Member
    Posted 1 year ago #

    I've hit a bit of a road block.

    Store I'm setting up has large bulky products that qualify for free local delivery and cheap small products that don't individually but would if bought with large bulky items.

    Is there away around this? How can I set a minimum order value to enable free local delivery?

    Thanks a lot!

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

  2. blubbbiz
    Member
    Posted 1 year ago #

    hi
    im also looking for a solution like this, did you found anything?

    would be great if someone can help :-)

    thanks

  3. alexluchini
    Member
    Posted 1 year ago #

    I am looking for this too, anyway to enable a a minimum order for free local delivery in woocommerce??

  4. bheadrick
    Member
    Posted 1 year ago #

    If you want your minimum order amount to be $500, use this in your theme's functions.php

    add_filter( 'woocommerce_available_shipping_methods', 'conditional_local_delivery' );
    
    function conditional_local_delivery($methods){
        if(!is_admin()){
    global $woocommerce;
    $amount = 500;
    if($woocommerce->cart->cart_contents_total < $amount){
        echo 'Amount is ' . $woocommerce->cart->cart_contents_total;
        unset($methods['local_delivery']);
    }}
    return $methods;
    }
  5. bheadrick
    Member
    Posted 1 year ago #

    You may also need to add

    $available_methods(apply_filters('woocommerce_available_shipping_methods',$available_methods);

    just after
    if ( $available_methods ) {

    on the /checkout/review-order.php template file

  6. alexluchini
    Member
    Posted 1 year ago #

    Hey,

    Thank you so much for providing this. It didn't work though.
    It still lets me go through the order process without stopping me.

    But, I really appreciate your help!

    -a

  7. Phil C
    Member
    Posted 1 year ago #

    Was anyone able to get any further with this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic