{"id":12758926,"date":"2020-04-30T15:06:58","date_gmt":"2020-04-30T15:06:58","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/expected-behavior\/"},"modified":"2020-04-30T15:06:58","modified_gmt":"2020-04-30T15:06:58","slug":"expected-behavior","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/expected-behavior\/","title":{"rendered":"Expected behavior?"},"content":{"rendered":"<p>I&#8217;ve setup a custom shipping method that makes use of the distance matrix api.<br \/>\nEverything works fine but I see that the distance based fee is added on top of the handling price even when the minimum threshold for the amount of km&#8217;s is not. <\/p>\n<p>we only charge distance based fee after 25km&#8217;s with a fixed handling fee regardless of km&#8217;s.<\/p>\n<p>For me this is unexpected, I would rather expect to only see the handling fee when the minimum\/maximum thresholds are not met.<\/p>\n<p>[WORKAROUND] Hide the method when conditions are not met and create a copy with the minimum amount as maximum amount and set the distance based fee to 0.<\/p>\n<p>Would you elaborate on the question if this is expected or unexpected? and if unexepected, can this be fixed?<\/p>\n<p>Kind regards,<br \/>\nYari<\/p>\n<p>PS, amazing plugin \ud83d\ude42<\/p>\n","protected":false},"template":"","class_list":["post-12758926","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12758926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/12758926\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=12758926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}