=== Bevstack Fulfillment Connector ===
Contributors: bevstack
Tags: woocommerce, shipping, delivery, local pickup, fulfillment
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Offer Delivery, Shipping and Store Pickup at WooCommerce checkout using BottleCapps availability, and forward placed orders to the service.

== Description ==

This plugin connects a WooCommerce store to **BottleCapps** (liquorapps.com), a third-party fulfillment service for beverage retailers. It is an independent integration developed by Bevstack and is not affiliated with, endorsed by, or sponsored by BottleCapps or Google.

At checkout the plugin asks the BottleCapps service which fulfillment options are available for the customer's address and the products in the cart, then shows the available options as WooCommerce shipping rates:

* Delivery
* Shipping (with optional weight-band pricing)
* Store Pickup

When an order is placed it is forwarded to BottleCapps, and order-status updates sent back by BottleCapps are applied to the WooCommerce order.

**A BottleCapps merchant account is required.** This plugin is a connector to an external service and cannot function without one. You enter your own BottleCapps API credentials on the plugin settings screen; no credentials are bundled with the plugin.

= Requirements =

* WooCommerce (active)
* A BottleCapps merchant account and API credentials
* Optional: a Google Maps API key, if you want address autocomplete and geocoding

== External services ==

This plugin relies on the following third-party services. Both are external to your site, and data is transmitted to them as described below.

**1. BottleCapps / liquorapps.com (required)**

BottleCapps is the fulfillment service that determines which delivery, shipping and pickup options are available for an order, receives your orders, and reports fulfillment status back to your store. The plugin cannot provide any of its functionality without this service.

*What is sent, and when:*

* **When a customer reaches checkout and enters a shipping address:** the shipping destination (street, city, state, ZIP/postal code, country) and, for each item in the cart, the product identifier (UPC/GTIN), name, quantity and price. This is sent to the availability endpoint so the service can return the fulfillment options for that address.
* **When an order is placed:** the order number and totals, the chosen fulfillment option, the customer's billing and shipping name, address, email address and phone number, and the ordered items (UPC, name, quantity, price). This is sent to the order endpoint so the order can be fulfilled.
* **When the plugin is activated or its public URL changes:** your site name and site URL, so the service can send order-status updates back to your store.

*Service provider:* BottleCapps — https://bottlecapps.com
*Terms and conditions:* https://bottlecapps.com/terms-and-conditions
*Privacy policy:* https://bottlecapps.com/privacy-policy

**2. Google Maps Platform (optional)**

Used only if you enter a Google Maps API key in the plugin settings. It provides address autocomplete on the checkout form and converts the entered address into coordinates, which improves the accuracy of the store/availability lookup. If no API key is configured, the plugin makes no requests to Google and sends coordinates of 0,0 instead.

*What is sent, and when:*

* **Google Maps JavaScript API / Places (in the customer's browser, at checkout):** the address text the customer types into the address field, in order to show address suggestions.
* **Google Geocoding API (from your server, when availability is checked or an order is forwarded):** the shipping address (street, city, state, ZIP/postal code, country), in order to obtain its latitude and longitude.

*Service provider:* Google — https://mapsplatform.google.com
*Terms of service:* https://cloud.google.com/maps-platform/terms
*Privacy policy:* https://policies.google.com/privacy

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin to `/wp-content/plugins/`, or install it through the WordPress Plugins screen, and activate it.
3. Go to **WooCommerce > BottleCapps** and enter your BottleCapps API base URL, username and password.
4. Optionally enter a Google Maps API key to enable address autocomplete and geocoding.
5. Configure the Shipping and Delivery options and charges on their tabs.

== Frequently Asked Questions ==

= Do I need a BottleCapps account? =

Yes. The plugin is a connector to the BottleCapps fulfillment service and requires valid BottleCapps API credentials. It has no functionality of its own without that account.

= Does it work without WooCommerce? =

No. WooCommerce must be installed and active.

= Is a Google Maps API key required? =

No. It is optional. Without a key the plugin does not contact Google at all; address autocomplete is simply unavailable and the address is resolved by ZIP code instead.

= Is this plugin made by BottleCapps? =

No. It is developed by Bevstack as an independent integration with the BottleCapps service.

== Changelog ==

= 0.2.1 =
* All option, transient, filter, meta and script names now use a single distinct `bev_fulfillment` prefix.
* API credentials and tokens are masked on the settings screen.

= 0.2.0 =
* Renamed the plugin to clarify that it is an independent integration.
* No credentials are bundled with the plugin; all API settings are entered by the site owner.
* Documented all external services and the data sent to them.
* Inbound REST endpoints now require authentication and fail closed.
* All request input (including headers and JSON bodies) is sanitized before use.
* Admin settings script is enqueued instead of printed inline.

= 0.1.2 =
* Initial submission.

== Upgrade Notice ==

= 0.2.0 =
Security and compliance update. After upgrading, re-enter your BottleCapps API credentials on the settings screen.
