Hide Map Even When All Shipping Methods Are Local Pickup Methods

< 1 min read

By default, Kikote will ignore your Visibility Rules and always show the map when the only shipping methods returned are Local Pickup methods.

This is to prevent the plugin from locking a user out from being able to select their location on the map if the only shipping methods available are Local Pickup methods. In some cases you might still want to hide the map if only local shipping methods are shown. One such case would be if you’re making use of our Delivery & Pickup Scheduling Plugin that lets you automatically show and hide local pickup shipping methods based on the order type.

In such a case you might want to hide the map when the user switches their order type to “Pickup” and show it when they switch to “Delivery”.

You can use the filter below to get Kikote to stop overriding the Visibility Rules.

PHP
add_filter('lpac_override_map_visibility', '__return_false');