WooCommerce integration details

The release of Cardinal Store Locator version 1.6.0 introduced WooCommerce integration functionality. Additional e-commerce platform support may be added in the future but it made the most sense to start with WooCommerce, which has a healthy market share and has been owned by Automattic since 2015. The primary initial integration features include:

  • Built-in methods to connect WooCommere products to Cardinal Store Locator locations and vice versa
  • Add product category filtering to your store locator
  • Add product filtering to your store locator
  • Placing a locator on a single product page shows all the connected store locations
  • From a programmatic perspective:
    • The locations can be pulled in and used as needed on the product side using the bh_sl_location_ids meta value
    • The products can be pulled in and used as needed on the location side using the bh_sl_loc_products taxonomy value/s

Connecting products to locations

On the WooCommerce side, a product can be assigned to a location under the Product data section when adding or editing a product. Under the Store locations tab search for the desired location, wait for the results, select the intended location, and then hit the normal Save draft, Publish, or Update button.

Example screencapture displaying how to connect a WooCommerce product to one or multiple Cardinal store location

When editing a Cardinal location, associated products with the location can be reviewed an unassigned via a new “Location Products” taxonomy, which shows up along with the Location Categories taxonomy as pictured below. Note that this taxonomy can only currently be used to remove connected location products.

Screenshot highlighting how products are connected to locations when editing a Cardinal location post

Product related locator filters

With product > location connections in place as described above, it allows locations to be filtered within the store locator. Under Settings > Cardinal Locator > Filter Settings new options can be found, which will automatically be added to your locator/s when using the shortcode to handle the output.

Screenshot of Cardinal filter settings screen highlighting new Location Categories and Location Products filter options.