Okay
  Public Ticket #2911717
Location
Closed

Comments

  • Laurent L. started the conversation

    Hello,

    I just install the plug-in. I wish my website to be the less intrusive so I don't want that it asks automatically for visitor automatic location for the itinerary function.


    Is it possible to deactivate this browser asking when visiting the events pages ?

    Thank you.

  •  877
    Zhivko replied

    Hi,

    At the moment the only way to disable this function is to provide custom start location.

    Open your theme or child-theme functions.php file and add following hook:

    add_action('wp_footer', function() {
        if (wp_script_is('stec-db-js')) {
            ?>
            <script type="text/javascript">
                (function ($) {
                    const myLocation = 'Address'; // default location
                    $(function () {
                        if (typeof $.stecExtend === 'function') {
                            $.stecExtend(function (m) {
                                m.glob.options.myLocation = myLocation;
                            });
                        } else {
                            window.stecSingleOptions.myLocation = myLocation;
                        }
                    });
                })(window.jQuery);
            </script>
            <?php
        }
    });

    Stachethemes Developer

  • Laurent L. replied

    I'll try this. Thank you !