# Hide address fields for parcel machines — User Guide

## What this plugin does
Hides **billing address fields** (address line 1, address line 2, city, postcode) and **removes the Billing “State” field** on the WooCommerce **Classic Checkout** page when the customer selects a **Montonio parcel machine or post office** shipping method.


## Requirements
- WordPress 6.0+
- WooCommerce 7.0+ (tested up to WC 9.2)
- PHP 7.4+

## Installation
1. Go to **Plugins → Add New → Upload Plugin**.
2. Upload the ZIP: `hide-address-fields-for-parcel-machines.zip`.
3. Activate the plugin.
4. Navigate to "Parcel machines" in Wordpress admin panel.
5. Choose which shipping provider will have extra address fields hidden.
6. Save settings.

## How it works (merchant view)
- When a shopper chooses a **Montonio** parcel method at checkout, the plugin hides:
  - `billing_address_1`, `billing_address_2`, `billing_city`, `billing_postcode`
- If the shopper switches away from Montonio methods, the inputs are shown again.

## Compatibility
- **HPOS:** compatible (declares compatibility; no order data is accessed).
- **Themes:** Compatible with themes that don’t heavily modify WooCommerce checkout templates.
- **Other shipping plugins:** The plugin only reacts to **Montonio** method IDs (see list below).

### Supported Montonio method IDs
- `montonio_omniva_parcel_machines`
- `montonio_omniva_post_offices`
- `montonio_dpd_parcel_machines`
- `montonio_dpd_parcel_shops`
- `montonio_venipak_parcel_machines`
- `montonio_venipak_post_offices`
- `montonio_itella_parcel_machines`
- `montonio_itella_post_offices`
- `montonio_unisend_parcel_machines`
- `montonio_latvian_post_parcel_machines`

## Troubleshooting
- **Fields don’t hide/show:** Confirm the chosen shipping method is one of the supported Montonio methods above.
- **Theme overrides:** Custom checkout templates may interfere; temporarily switch to Storefront to verify.
- **Conflicts:** Disable other checkout-customizer plugins to test for conflicts.

## Privacy & Data
- The plugin does **not** collect or send personal data to external services.
- No settings or new database tables are created.

## Uninstall
- Deactivate and delete the plugin from **Plugins**. No data is stored, so deletion is clean.

## Support
- Documentation: included in this `docs/` folder and the plugin `readme.txt`.
- Email us at **harri@leiakink.ee**.
- Typical response target: **1–3 business days**
