=== Digital Plug Store Locator ===
Contributors: digitalplugs
Tags: store locator, google maps, woocommerce, locations, maps
Requires at least: 5.9
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A premium, highly-customizable Store Locator with Google Maps integration, WooCommerce stock sync, dynamic filtering, and geospatial search.

== External Services ==

This plugin integrates with and sends data to Google Maps APIs (specifically the Maps JavaScript API, Geocoding API, and Places API) to render the interactive map search, fetch location coordinates, and display autocompleted addresses.
* **Data Transmitted:** The user's input addresses, coordinates (latitude/longitude), and your Google Maps API Key are sent to Google's servers.
* **Privacy Policy:** Google Privacy Policy https://policies.google.com/privacy
* **Terms of Service:** Google Maps Platform Terms of Service https://cloud.google.com/maps-platform/terms

== Description ==

**Digital Plug Store Locator** is a powerful and fully-featured WordPress plugin designed to help your customers find your physical stores, distributors, or branches with ease. With an ultra-modern, responsive user interface and a robust administrative backend, it is the ultimate map solution for any business.

Whether you have 5 stores or 50,000, Digital Plug Store Locator's optimized database queries and advanced geospatial routing ensure lightning-fast performance.

### 🌟 Key Features

*   **Modern Interactive Map Interface:** A beautiful, responsive map interface that looks great on mobile and desktop. Includes smooth animations and customizable UI elements.
*   **Geospatial "Near Me" Search:** Automatically detects the user's location using browser APIs and calculates exact distances to all nearby stores using the Haversine formula.
*   **Dynamic Attribute Filters:** Create endless custom taxonomies (e.g., "Services", "Facilities", "Brands") just like WooCommerce attributes! Display them as dropdowns or checkboxes so users can easily filter their results.
*   **Deep WooCommerce Integration:** Link physical stores to your WooCommerce inventory. Includes a "Find in Store" modal directly on product pages and localized stock availability indicators.
*   **Custom Map Styles:** Paste your own Google Maps Style JSON directly into the settings to match your brand's aesthetics perfectly.
*   **Bulk Import & Export:** Easily manage massive numbers of locations with robust CSV import and export tools.
*   **Built-in Analytics:** Track which locations your users are searching for most often directly from the WordPress dashboard.
*   **Local SEO Optimized:** Generates comprehensive Schema.org markup (LocalBusiness) and OpenGraph meta tags for every individual store page, boosting your local search rankings.
*   **Custom Map Pins:** Upload and assign unique map marker icons globally or per-store.

### 🛠️ Easy to Use Shortcode

Simply drop `[dpsl_store_locator]` onto any page or post to display your map! 

You can also customize the output using shortcode parameters:
*   `[dpsl_store_locator show_map="true" show_search="true" show_filter="true" per_page="20"]`

### 🚀 Built for Performance

Unlike basic store locators that load all map data into the browser at once, Digital Plug Store Locator uses an advanced AJAX backend. It dynamically fetches only the stores matching the user's viewport, radius, and filters—resulting in near-instant load times regardless of how many locations you manage.

== Installation ==

1. Upload the `digital-plug-store-locator` folder to the `/wp-content/plugins/` directory, or install the ZIP file directly through the WordPress Plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Navigate to **Store Locator > Settings** to enter your Google Maps API Key.
4. (Optional) Create custom attributes under **Store Locator > Attributes**.
5. Add your store locations under **Store Locator > Add New Store**.
6. Place the `[dpsl_store_locator]` shortcode on any page.

**Google Maps API Requirements:**
To use this plugin, you must have a valid Google Cloud API key with the following APIs enabled:
*   Maps JavaScript API
*   Geocoding API
*   Places API (optional, for autocomplete)

== Frequently Asked Questions ==

= Why does the map display a "For Development Purposes Only" watermark? =
This means your Google Maps API key is either missing, invalid, or does not have a billing account attached. Google requires a credit card on file to use their map APIs, even though they provide a generous free monthly tier.

= How do I sync store inventory with WooCommerce? =
If WooCommerce is active, a "Stock Matrix" meta box will appear when editing a store. You can link specific products and define their stock status (In Stock, Low Stock, Out of Stock) at that specific location.

= How do I translate the plugin? =
The plugin is fully localization-ready. You can use plugins like Loco Translate or WPML to translate the strings in the `digital-plug-store-locator` text domain.

== Screenshots ==

1. The modern frontend store locator interface with dynamic filtering.
2. The dynamic Store Attributes manager in the WordPress admin.
3. The store editor showing custom map pins and address geocoding.
4. The plugin settings panel with custom Map Style JSON integration.

== Changelog ==

= 1.0.0 =
* Initial stable release.
* Added dynamic WooCommerce-style attribute taxonomies for filtering.
* Refined AJAX text and geospatial search logic.
* Added Schema.org SEO output and single-store template overrides.
* Added robust Google Maps integration with custom JSON styling.
