• Hey,

    The maximum distance field does not work if the delivery address is in the allowed postcode field e.g. 77000…77999.

    Let me explain, I used your dbf_calculated_fee hook to calculate a fixed charge if the distance is between w and x and y and z.

    function my_dbf_calculated_fee_callback( $calculatedFee, $kiloMeters, $divider, $price ) {
    if($kiloMeters > 0 && $kiloMeters < 2.5) {
    $calculatedFee = 8;
    }
    else {
    $calculatedFee = 12;
    }
    return $calculatedFee;
    }
    add_filter( ‘dbf_calculated_fee’, ‘my_dbf_calculated_fee_callback’, 10, 4 );

    I have entered 8kms in the maximum field but if I enter an address that is 9kms away but has a postcode of 77000…77999 then the charges become free… and you can select the delivery option.

    Please, have you had this case before?

    Thank you in advance

    • This topic was modified 3 years, 8 months ago by yoh33.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Maximum distance field does not work’ is closed to new replies.