How to filter the Google Map in the delivery drivers order details

17 seconds

You can change the map that’s displayed for drivers in the order details section of the driver dashboard by using the function below.

ddwc_delivery_address_google_map

Copy the following into your theme’s functions.php file and customize line 11 to override the google map with whatever you’d like 🙂

<?php
/**
* Google Maps filter
*
* @author Robert DeVore <deviodigital@gmail.com>
* @link https://www.wordpress.org/plugins/delivery-drivers-for-woocommerce/
* @return string
*/
functionacme_google_maps_delivery_address( $google_map, $delivery_address, $store_address ) {
// Change the google map.
$google_map = 'DO YOUR THING';
return$google_map;
}
add_filter( 'ddwc_delivery_address_google_map', 'acme_delivery_address_google_map', 10, 3 );

Was this article helpful?