• Good morning Tijmen,
    
    When I upgrade to version 2.2.237, the card no longer works…
    
    The errors are as follows:
    Uncaught ReferenceError: formatPhoneNumber is not defined
    Uncaught ReferenceError: createDirectionUrl is not defined…
    
    I'm using Divi with a child theme, and my function.php file is as follows: set('orderby', 'title'); $query->set('order', 'ASC'); } } //// ordre alpha dans la recherche function SearchFilterAlphabetique($query) { if ($query->is_search) { $query->set('order','ASC'); $query->set('orderby','title'); } return $query; } add_filter('pre_get_posts','SearchFilterAlphabetique'); //// OMS ADD CARTE WP STORE LOCATOR //add_filter( 'wpsl_enable_styled_dropdowns', '__return_false' ); add_filter( 'wpsl_max_dropdown_height', 'custom_max_dropdown_height' ); function custom_max_dropdown_height() { return 200; } // au chargement de la page s'aligne en haut de la carte //add_filter( 'wpsl_map_tab_anchor_return', '__return_true' ); //// OMS ADD CARTE add_filter( 'wpsl_dropdown_category_args', 'custom_dropdown_category_args' ); function custom_dropdown_category_args( $args ) { if ( is_page( 'cartographie' ) ) { $args['parent'] = 32; // parent category ID $args['hierarchical'] = true; // only show the child categories } //print_r($args); return $args; } add_filter( 'wpsl_frontend_meta_fields', 'custom_frontend_meta_fields' ); function custom_frontend_meta_fields( $store_fields ) { $store_fields['wpsl_structurenom'] = array( 'name' => 'structurenom', 'type' => 'text' ); return $store_fields; } ////////// RECUP DES CATEGORIE add_filter( 'wpsl_store_meta', 'custom_store_meta', 10, 2 ); function custom_store_meta( $store_meta, $store_id ) { $terms = get_the_terms( $store_id, 'wpsl_store_category' ); $store_meta['terms'] = ''; if ( $terms ) { if ( ! is_wp_error( $terms ) ) { if ( count( $terms ) > 1 ) { $location_terms = array(); foreach ( $terms as $term ) { $location_terms[] = $term->name; } $store_meta['terms'] = implode( ', ', $location_terms ); } else { $store_meta['terms'] = $terms[0]->name; } } } return $store_meta; } /////////////// lecture dossier marker dans la theme en cours add_filter( 'wpsl_admin_marker_dir', 'custom_admin_marker_dir' ); function custom_admin_marker_dir() { $admin_marker_dir = get_stylesheet_directory() . '/wpsl-markers/'; return $admin_marker_dir; } ////////// définition du marker define( 'WPSL_MARKER_URI', dirname( get_bloginfo( 'stylesheet_url') ) . '/wpsl-markers/' ); ////// LISTING TEMPLATE OMS add_filter( 'wpsl_listing_template', 'custom_listing_template' ); function custom_listing_template() { global $wpsl, $wpsl_settings; $listing_template = ''; $listing_template .= '
    
    '; $listing_template .= '
    
    <%= thumb %>' . "\r\n"; $listing_template .= wpsl_store_header_template( 'listing' ); // Check which header format we use $listing_template .= '<% if ( structurenom ) { %>'; $listing_template .= '
    
    <%= structurenom %>
    <%= formatPhoneNumber( phone ) %>'; //$listing_template .= '
    
    <%= structurenom %>
    <%= phone %>'; $listing_template .= '<% } %>'; // Include the category names. $listing_template .= "\t\t\t" . '<% if ( terms ) { %>' . "\r\n"; $listing_template .= "\t\t\t" . '
    
    ' . __( '', 'wpsl' ) . ' <%= terms %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% } %>' . "\r\n"; /*$listing_template .= "\t\t\t\t" . '<%= address %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<% if ( address2 ) { %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<%= address2 %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t\t\t" . '' . wpsl_address_format_placeholders() . '' . "\r\n"; // Use the correct address format*/ if ( !$wpsl_settings['hide_country'] ) { $listing_template .= "\t\t\t\t" . '<%= country %>' . "\r\n"; } $listing_template .= ''; // Show the phone, fax or email data if they exist. if ( $wpsl_settings['show_contact_details'] ) { $listing_template .= "\t\t\t" . '
    
    ' . "\r\n"; $listing_template .= "\t\t\t" . '<% if ( phone ) { %>' . "\r\n"; $listing_template .= "\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'phone_label', __( 'Phone', 'wpsl' ) ) ) . ': <%= formatPhoneNumber( phone ) %>' . "\r\n"; //$listing_template .= "\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'phone_label', __( 'Phone', 'wpsl' ) ) ) . ': <%= phone %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% if ( fax ) { %>' . "\r\n"; $listing_template .= "\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'fax_label', __( 'Fax', 'wpsl' ) ) ) . ': <%= fax %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% if ( email ) { %>' . "\r\n"; $listing_template .= "\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'email_label', __( 'Email', 'wpsl' ) ) ) . ': <%= email %>' . "\r\n"; $listing_template .= "\t\t\t" . '<% } %>' . "\r\n"; $listing_template .= "\t\t\t" . '' . "\r\n"; } $listing_template .= 'Voir la fiche complète'; $listing_template .= wpsl_more_info_template(); // Check if we need to show the 'More Info' link and info $listing_template .= '<%= createDirectionUrl() %>' . "\r\n"; $listing_template .= ''; /*$listing_template .= "\t\t" . '
    
    ' . "\r\n"; if ( !$wpsl_settings['hide_distance'] ) { $listing_template .= "\t\t\t" . '<%= distance %> ' . esc_html( $wpsl_settings['distance_unit'] ) . '' . "\r\n"; } $listing_template .= "\t\t\t" . '<%= createDirectionUrl() %>' . "\r\n"; $listing_template .= "\t\t" . '' . "\r\n";*/ $listing_template .= ''; return $listing_template; } ////// TITRE STORE TEMPLATE OMS add_filter( 'wpsl_store_header_template', 'custom_store_header_template' ); function custom_store_header_template() { $header_template = '<%= store %>'; return $header_template; } ////// MORE INFO TEMPLATE OMS add_filter( 'wpsl_more_info_template', 'custom_more_info_template' ); function custom_more_info_template() { global $wpsl_settings, $wpsl; $more_info_url = '#'; if ( $wpsl_settings['template_id'] == 'default' && $wpsl_settings['more_info_location'] == 'info window' ) { $more_info_url = '#wpsl-search-wrap'; } if ( $wpsl_settings['more_info_location'] == 'store listings' ) { $more_info_template = '<% if ( !_.isEmpty( phone ) || !_.isEmpty( fax ) || !_.isEmpty( email ) ) { %>' . "\r\n"; $more_info_template .= "\t\t\t" . '
    
    ' . esc_html( $wpsl->i18n->get_translation( 'more_label', __( 'More info', 'wpsl' ) ) ) . '' . "\r\n"; $more_info_template .= "\t\t\t" . '
    
    ' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% if ( description ) { %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<%= description %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; if ( !$wpsl_settings['show_contact_details'] ) { $more_info_template .= "\t\t\t\t" . '
    
    ' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% if ( phone ) { %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'phone_label', __( 'Phone', 'wpsl' ) ) ) . ': <%= formatPhoneNumber( phone ) %>' . "\r\n"; //$more_info_template .= "\t\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'phone_label', __( 'Phone', 'wpsl' ) ) ) . ': <%= phone %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% if ( fax ) { %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'fax_label', __( 'Fax', 'wpsl' ) ) ) . ': <%= fax %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% if ( email ) { %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '' . esc_html( $wpsl->i18n->get_translation( 'email_label', __( 'Email', 'wpsl' ) ) ) . ': <%= email %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '' . "\r\n"; } if ( !$wpsl_settings['hide_hours'] ) { $more_info_template .= "\t\t\t\t" . '<% if ( hours ) { %>' . "\r\n"; $more_info_template .= "\t\t\t\t" . '
    
    ' . esc_html( $wpsl->i18n->get_translation( 'hours_label', __( 'Hours', 'wpsl' ) ) ) . '<%= hours %>
    
    ' . "\r\n"; $more_info_template .= "\t\t\t\t" . '<% } %>' . "\r\n"; } $more_info_template .= "\t\t\t" . '' . "\r\n"; $more_info_template .= "\t\t\t" . '<% } %>'; } else { $more_info_template = '
    
    ' . esc_html( $wpsl->i18n->get_translation( 'more_label', __( 'More info', 'wpsl' ) ) ) . ''; } return $more_info_template; } add_filter( 'wpsl_meta_box_fields', 'custom_meta_box_fields' ); function custom_meta_box_fields( $meta_fields ) { $meta_fields[__( 'Additional Information', 'wpsl' )] = array( 'phone' => array( 'label' => __( 'Tel', 'wpsl' ) ), 'fax' => array( 'label' => __( 'Fax', 'wpsl' ) ), 'email' => array( 'label' => __( 'Email', 'wpsl' ) ), 'url' => array( 'label' => __( 'Url', 'wpsl' ) ), 'structurenom' => array( 'label' => __( 'Structure nom', 'wpsl' ) ) ); return $meta_fields; } add_filter( 'wpsl_infobox_settings', 'custom_infobox_settings' ); function custom_infobox_settings( $infobox_settings ) { $infobox_settings['infoBoxClass'] = 'wpsl-infobox'; $infobox_settings['infoBoxCloseMargin'] = '2px'; $infobox_settings['infoBoxCloseUrl'] = '//www.google.com/intl/en_us/mapfiles/close.gif'; $infobox_settings['infoBoxClearance'] = '40,40'; $infobox_settings['infoBoxDisableAutoPan'] = 0; $infobox_settings['infoBoxEnableEventPropagation'] = 0; $infobox_settings['infoBoxPixelOffset'] = '-52,-45'; $infobox_settings['infoBoxZindex'] = 1500; return $infobox_settings; } ?>
    
    So I went back to the previous version while waiting to find a solution.
    
    Can you help me understand the problem?
    
    Thank you in advance for your return.
    
    Marc

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi!

    Thanks for reaching out.

    Please let us know if you are running any cache/optimization plugins, as some of them are known to cause interactions with Wp Store Locator in some circumstances. Also, please have a look at this other thread with some more info on this, and get back and let us know your situation.

    Many thanks!

    Thread Starter omsolution

    (@omsolution)

    Hi, Thank for the response.

    I have clear the cache of divi before update wp-store-locator, and it’s works.

    Thanks !!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    You mean this cache option that clears the CSS cache, or a cache option from an actual caching plugin?

    Thread Starter omsolution

    (@omsolution)

    Hello, thank you for your help.
    I didn’t think this option in divi would generate cache files other than css.
    So I deleted the cache with the “clear” button, disabled the option Generation of static CSS files, installed the WP locator update, and then reactivated the option in divi.
    Thanks again for the support and your super extention!
    Marc

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘V2.2.237 Error’ is closed to new replies.