Title: Critical error when customizing markers
Last modified: June 26, 2023

---

# Critical error when customizing markers

 *  [briansgnm](https://wordpress.org/support/users/briansgnm/)
 * (@briansgnm)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/critical-error-when-customizing-markers/)
 * Dear Tijmen,
   We experience a critical site error when we try to customize the
   store markers on the map. This happens for category markers as well as a single
   stores. This happens on a client site and on a clean installation.Copied code
   block below from your documentation and inserted into functions.php. Other customizations
   seem to be working fine.
 *     ```wp-block-code
       add_filter( 'wpsl_store_meta', 'custom_store_meta', 10, 2 );
   
       function custom_store_meta( $store_meta, $store_id ) {
   
           if ( function_exists( 'z_taxonomy_image_url' ) ) {
               $terms = wp_get_post_terms( $store_id, 'wpsl_store_category' );
   
               if ( $terms ) {
                   if ( !is_wp_error( $terms ) ) {
                       if ( isset( $_GET['filter'] ) && $_GET['filter'] ) {
                           $filter_ids = explode( ',', $_GET['filter'] );
   
                           foreach ( $terms as $term ) {
                               if ( in_array( $term->term_id, $filter_ids ) ) {
                                   $cat_marker = z_taxonomy_image_url( $term->term_id );
   
                                   if ( $cat_marker ) {
                                       $store_meta['categoryMarkerUrl'] = $cat_marker;
                                   }
                               }
                           }
                       } else {
                           $store_meta['categoryMarkerUrl'] = z_taxonomy_image_url( $terms[0]->term_id );
                       }
                   }
               }
           }
   
           return $store_meta;
       }
       ```
   
 * I am dutch speaking perhaps contact via e-mail would speed things up?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcritical-error-when-customizing-markers%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [farroyo](https://wordpress.org/support/users/farroyob/)
 * (@farroyob)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/critical-error-when-customizing-markers/#post-16848849)
 * Hi there, thanks for reaching out.
 * It would be very useful for us to know the contents of the server error log file
   when this happens.
 * Sometimes it is enough to have these settings inside of your wp-config.php file
   to have your WordPress write the contents of the errors into a log file:
 *     ```
       // Enable WP_DEBUG mode
       define( 'WP_DEBUG', true );
   
       // Enable Debug logging to the /wp-content/debug.log file
       define( 'WP_DEBUG_LOG', true );
       ```
   
 * With these settings, the error should be looged in /wp-content/debug.log
 * Alternatively, you can ask your hosting provider for a server error log, and 
   we can also take a look at that to see what is causing this error.
 * Regards,

Viewing 1 replies (of 1 total)

The topic ‘Critical error when customizing markers’ 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: [2 years, 11 months ago](https://wordpress.org/support/topic/critical-error-when-customizing-markers/#post-16848849)
 * Status: not resolved