Title: Uncaught Error: Call to undefined function createDirectionUrl()
Last modified: July 3, 2025

---

# Uncaught Error: Call to undefined function createDirectionUrl()

 *  [jtsn21](https://wordpress.org/support/users/jtsn21/)
 * (@jtsn21)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-createdirectionurl/)
 * Hi,
 * What would make the createDirectionUrl() undefined? isn’t it a plugin function?
 *     ```wp-block-code
       if ( !$wpsl_settings['hide_distance'] ) {
           $listing_template .= "\t\t\t" . '<%= distance %> ' . esc_html( $wpsl_settings['distance_unit'] ) . ' | <%= createDirectionUrl() %>' . "\r\n";
       }
       ```
   

Viewing 1 replies (of 1 total)

 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-createdirectionurl/#post-18540939)
 * Hi there, thanks for writing.
 * That code snippet works fine for us in our test server inside of a well formed
   [wpsl_listing_template](https://wpstorelocator.co/document/wpsl_listing_template/)
   filter.
 * Please let us know the full contents of your wpsl_listing_template filter so 
   we can try to spot anything wrong.
 * Best regards,

Viewing 1 replies (of 1 total)

The topic ‘Uncaught Error: Call to undefined function createDirectionUrl()’ is closed
to new replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [farroyo](https://wordpress.org/support/users/farroyob/)
 * Last activity: [11 months, 1 week ago](https://wordpress.org/support/topic/uncaught-error-call-to-undefined-function-createdirectionurl/#post-18540939)
 * Status: not resolved