Support » Plugin: WebData Custom Shipping Methods for WooCommerce » Unable to create basic fixed fee for 1st 5km and round off calculation

  • Resolved ibnufuad91

    (@ibnufuad91)


    Hi, I have a requirement where I need to charge a fixed fee for 1st 5 km and add for every 1 km.

    I’m also unable to do round off price based on the calculation on divider and multiplication price. For example, instead of having 64.79 to the fee for 64.79 km, I would want to charge 65 instead.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author webdata

    (@webdata)

    Hi,

    If you are using the latest version of the plugin, you can choose how the distance based fee is calculated. See “Disable fixed fee if minimum distance is reached” option.

    For the rounding you need to use hook and customize the code: https://web-data.online/docs/woocommerce-custom-shipping-methods/#developers

    Kim

    Hi,

    I’ve set Fixed fee as 5, Minimum Distance 5, Divider 1 and Price 1. Unit Kilometres
    When I try to calculate for delivery for a location that has distance 560m, I’m getting Distance Fee as 5.56. I should be getting 5.00 instead as 560m is still less than minimum distance.

    Can I know where I can use hook and customise the code?

    Thank you.

    Plugin Author webdata

    (@webdata)

    Use your theme’s functions.php file or create custom plugin.

    Kim

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unable to create basic fixed fee for 1st 5km and round off calculation’ is closed to new replies.