The Premier Add On allows you to set a scheduled interval using the built-in WordPress Cron scheduler to calculate the initial distance for locations where the distance is zero.

The initial distance setting is used by Store Locator Plus to boost performance when loading the initial map.  It uses and SQL index on a numeric value to select a subset of data versus calculating values for potentially thousands of locations and then filtering based on the calculation.  For sites with more than 1,000 locations this feature significantly boosts initial map loading performance.

Scheduling Initial Distance

To setup recurring distance calculations you will need the Premier Add On running with Store Locator Plus 4.7.1.

Go to the General tab.

Select the Schedule subtab.

Select the recurring interval for the Initial Distance event from the drop down.    All of the events will run “on the hour” other than now and never.

Premier Schedule Initial Distance

The Intervals

Never

Select never to turn off the recurring initial distance calculation.  This will take any scheduled initial distance calculation events out of the queue.

Now

Now will run the initial distance calculation event one time through the cron process.  It will be scheduled to run 10 seconds from the time you save the change.

This can be useful in cases where you want to immediately initial distance calculation but do not want to tie up a browser session with the process as happens via the Manage Locations bulk actions.

Hourly

Runs every hour on the hour, starting at the next “top of the hour”.

Twice Daily

Runs every 12 hours starting at the next “top of the hour” and every 12 hours thereafter.

Daily

Runs every 24 hours starting at the next “top of the hour” and every 24 hours thereafter.

 

Notes

This should not be required if your external applications utilize the built-in REST API or Store Locator Plus hooks-and-filters to load data.

Schedule initial distance calculations may be necessary if you have an application that is writing records directly to the Store Locator Plus locations table.

This process does not trigger other hooks and filters such as the related custom store post type that is necessary when using either Categories or Pages features provided by the Power add on.

The preferred method for adding locations is to use the REST API included with Store Locator Plus.

Add Ons That Support This Feature

Enroll in a Premier Subscription
Support product development : Purchase a Premier Subscription