# WooCommerce Tier and Package Prices - Releases

This directory contains production-ready releases of the WooCommerce Tier and Package Prices plugin.

## Latest Release

**Version 1.1.20** - December 23, 2025

### What's New in 1.1.20
- 🔧 **CRITICAL FIX:** Resolved WooCommerce Blocks fatal error in mini-cart and cart blocks
- ✅ Full WooCommerce Blocks compatibility (cart, mini-cart, checkout)
- ✅ Fixed `woocommerce_store_api_product_quantity_editable` filter signature
- ✅ Tier labels for enhanced UX (v1.1.7)
- ✅ Package quantity restrictions (v1.1.0)
- ✅ Clickable tier rows with auto-fill
- ✅ Enhanced "View Options" buttons

### Quick Install

```bash
# Download the package
wget https://your-domain.com/releases/wc-tier-and-package-prices-1.1.20.zip

# Verify checksum (optional but recommended)
sha256sum wc-tier-and-package-prices-1.1.20.zip

# Install via WordPress admin or WP-CLI
wp plugin install wc-tier-and-package-prices-1.1.20.zip --activate
```

## Files in This Directory

### Release Packages

| File | Description | Size |
|------|-------------|------|
| `wc-tier-and-package-prices-1.1.20.zip` | Production plugin package | ~400 KB |
| `wc-tier-and-package-prices-1.1.20.zip.sha256` | SHA-256 checksum | - |
| `wc-tier-and-package-prices-1.1.20.zip.md5` | MD5 checksum | - |
| `RELEASE-INFO-1.1.20.md` | Detailed release information | - |

## Verification

### Verify Package Integrity

**Using SHA-256:**
```bash
sha256sum -c wc-tier-and-package-prices-1.1.20.zip.sha256
```

**Using MD5:**
```bash
md5sum -c wc-tier-and-package-prices-1.1.20.zip.md5
```

### Expected Checksums

Checksums will be generated when the release package is created.

## Installation Methods

### Method 1: WordPress Admin (Recommended for most users)

1. Download `wc-tier-and-package-prices-1.1.20.zip`
2. Go to **WordPress Admin > Plugins > Add New**
3. Click **Upload Plugin**
4. Choose the downloaded ZIP file
5. Click **Install Now**
6. Click **Activate Plugin**

### Method 2: WP-CLI (For developers)

```bash
wp plugin install /path/to/wc-tier-and-package-prices-1.1.20.zip --activate
```

### Method 3: Manual Installation (Advanced)

```bash
# Extract to wp-content/plugins/
unzip wc-tier-and-package-prices-1.1.20.zip -d /path/to/wordpress/wp-content/plugins/

# Set correct permissions
chmod -R 755 /path/to/wordpress/wp-content/plugins/wc-tier-and-package-prices

# Activate via WordPress admin or WP-CLI
wp plugin activate wc-tier-and-package-prices
```

## What's Included

### Core Features
- ✅ Tier pricing with optional labels (quantity-based discounts)
- ✅ Package pricing with quantity restrictions (fixed-price bundles)
- ✅ Clickable tier rows with auto-quantity fill
- ✅ WooCommerce Blocks full support (cart, mini-cart, checkout)
- ✅ Twig template engine for secure templating
- ✅ WooCommerce HPOS (High-Performance Order Storage) compatible
- ✅ Quantity restriction enforcement
- ✅ "View Options" catalog buttons for restricted products
- ✅ Multilingual support (3 languages)

### Translations
- 🇺🇸 English (US)
- 🇩🇪 German (Germany)
- 🇨🇭 German (Switzerland, Informal)

### Production Ready
- ✅ Optimized autoloader
- ✅ No development dependencies
- ✅ Compiled Twig templates support
- ✅ Tested with WooCommerce 8.0 - 10.x
- ✅ Tested with WordPress 6.0 - 6.9.x
- ✅ PHP 7.4+ compatible
- ✅ Block-based themes compatible

## Package Contents

```
wc-tier-and-package-prices/
├── assets/                    # CSS and JavaScript
│   ├── css/
│   │   ├── admin.css
│   │   └── frontend.css
│   └── js/
│       ├── admin.js
│       └── frontend.js
├── includes/                  # PHP classes
│   ├── class-wc-tpp-admin.php
│   ├── class-wc-tpp-settings.php
│   ├── class-wc-tpp-cart.php
│   ├── class-wc-tpp-frontend.php
│   ├── class-wc-tpp-product-meta.php
│   └── class-wc-tpp-template-loader.php
├── languages/                 # Translation files
│   ├── wc-tier-package-prices-de_CH_informal.po
│   ├── wc-tier-package-prices-de_CH_informal.mo
│   ├── wc-tier-package-prices-de_DE.po
│   ├── wc-tier-package-prices-de_DE.mo
│   ├── wc-tier-package-prices-en_US.po
│   ├── wc-tier-package-prices-en_US.mo
│   └── wc-tier-package-prices.pot
├── templates/                 # Twig templates
│   ├── admin/
│   │   ├── tier-row.twig
│   │   └── package-row.twig
│   └── frontend/
│       ├── pricing-table.twig
│       ├── tier-pricing-table.twig
│       └── package-pricing-display.twig
├── vendor/                    # Composer dependencies
│   └── twig/twig/
├── CHANGELOG.md
├── INSTALLATION.md
├── QUICKSTART.md
├── USAGE_EXAMPLES.md
├── README.md
├── composer.json
└── wc-tier-and-package-prices.php
```

## System Requirements

| Requirement | Minimum Version | Tested Up To |
|-------------|----------------|--------------|
| WordPress | 6.0+ | 6.9.x |
| PHP | 7.4+ | 8.x |
| WooCommerce | 8.0+ | 10.x |
| MySQL | 5.6+ | 8.x |

## Support

- **Documentation:** See README.md, INSTALLATION.md, QUICKSTART.md, USAGE_EXAMPLES.md
- **Repository:** https://src.bundespruefstelle.ch/magdev/wc-tier-package-prices
- **Author:** Marco Graetsch

## Version History

### 1.1.20 (2025-12-23) - Current Release
- **CRITICAL FIX:** WooCommerce Blocks fatal error resolved
- Fixed filter signature for `woocommerce_store_api_product_quantity_editable`
- Full compatibility with WooCommerce Store API and block-based cart/checkout
- Enhanced stability for block-based themes

### 1.1.7 (2025-12-22)
- Added optional tier labels for enhanced UX
- Clickable tier rows with auto-quantity fill
- Add to Cart button auto-disable for invalid quantities

### 1.1.4 (2025-12-22)
- WooCommerce Blocks support (cart, mini-cart, checkout)
- Enhanced "View Options" button styling

### 1.1.0 (2025-12-21)
- Package quantity restrictions (global and per-product)
- Quantity field hiding for restricted products
- Server-side validation for package quantities

### 1.0.1 (2025-12-21)
- Added Twig template engine
- Added Swiss German translation
- Improved template organization
- Enhanced security with auto-escaping

### 1.0.0 (2025-12-21)
- Initial release
- Tier pricing functionality
- Package pricing functionality
- German and English translations

For complete version history, see [CHANGELOG.md](../CHANGELOG.md)

## License

GPL v2 or later - https://www.gnu.org/licenses/gpl-2.0.html

---

**Note:** All packages are production-ready with optimized autoloaders and no development dependencies included.
