Your cart is currently empty!
Documentation
PCR Pickup & Delivery Checker Popup for WooCommerce — Documentation (v1.2.1)
PCR Pickup & Delivery Checker Popup for WooCommerce
Popup for Pickup/Delivery, Google distance check, address autocompletion, and distance‑based minimum order — by Nav.
Contents
- Requirements
- Install & Activate
- Google Cloud & API Keys (Billing & Restrictions)
- Configure Plugin Settings
- How it works (Storefront)
- Distance-based Minimum Order
- Troubleshooting
- FAQ
- Support
1) Requirements
- WordPress 6.2+ and WooCommerce 7.8+ (tested up to WC 9.3).
- Google Cloud project with Billing enabled.
- Two Google API Keys (separate keys): Browser Key (Maps JavaScript + Places, restricted by HTTP referrer) and Server Key (Distance Matrix + Geocoding, restricted by server IP).
2) Install & Activate
- Upload the ZIP in WP Admin → Plugins → Add New → Upload.
- Activate PCR Delivery Checker for WooCommerce.
- Go to Settings → PCR Delivery.
3) Google Cloud & API Keys (Billing & Restrictions)
Important: Before creating keys, you must have Billing enabled on your Google Cloud project.
Open: Enable Billing
3.1 Enable required APIs
- Go to Google Cloud Console → select (or create) your project.
- Open APIs & Services → Library.
- Enable the following:
- Maps JavaScript API
- Places API
- Distance Matrix API
- Geocoding API
3.2 Create the Browser Key (Autocomplete)
- Open APIs & Services → Credentials → Create credentials → API key.
- Rename it e.g. Browser – Maps JS + Places.
- Click the key → set Application restrictions to HTTP referrers (web sites).
- Add your domain pattern, e.g.
https://yourdomain.com/*(includewwwif applicable). - Set API restrictions to Restrict key, then allow:
- Maps JavaScript API
- Places API
- Save. Paste this key into Settings → Maps JavaScript API key.
3.3 Create the Server Key (Distance)
- Again in Credentials → Create credentials → API key.
- Rename it e.g. Server – Distance Matrix + Geocoding.
- Click the key → set Application restrictions to IP Addresses.
- Add your server IP (ask your host; for dual-stack, add both IPv4/IPv6 if used).
- Set API restrictions to Restrict key, then allow:
- Distance Matrix API
- Geocoding API
- Save. Paste this key into Settings → Distance Matrix API key.
Why two keys? Browser key uses HTTP referrer restriction; Server key uses IP restriction to secure backend calls.
4) Configure Plugin Settings
- Enter your Store address (origin).
- Set Max delivery distance (km).
- Choose where the popup appears: Shop, Product, Category, Tag.
- (Optional) Delete plugin data on uninstall while testing.



5) How it works (Storefront)
- First visit → popup asks Pickup or Delivery.
- Delivery → enter address (autocomplete via Browser key).
- Click Check delivery to calculate distance via Server key.
- Save & continue stores choice + distance for this session and prefills checkout.
- After successful order, the popup resets and shows once next visit.
6) Distance-based Minimum Order
- € per km: 10 means 1km→10€, 2km→20€, etc.
- Rounding: ceil (recommended), nearest, or floor.
- Exclude categories: e.g., Drinks not counted toward the minimum.
7) Troubleshooting
- Popup missing: test in Incognito; ensure on Shop/Product/Category/Tag; clear with
?pcr_reset=1. - Google error REQUEST_DENIED: check Billing + API enablement + restrictions.
- Minimum not enforced: set order type to Delivery; ensure distance stored; check excluded categories.
- Avoid caching Cart/Checkout/admin-ajax.php.
8) FAQ
Two keys? Yes—Browser (referrer) for JS, Server (IP) for backend calls.
Standalone? Works without WooFood. It’s a WooCommerce add-on.
Reset? Add ?pcr_reset=1 while testing.
9) Support
Author: Nav. When contacting support, include WP/WC versions and any browser console/network errors. © 2025 Nav — PCR Delivery Checker for WooCommerce (v1.2.1)
