# Quick Installation Guide

## Prerequisites

✅ FINEART plugin installed
✅ WooCommerce active
✅ Edition number system working in functions.php

## Installation Steps

### 1. Download QR Library (REQUIRED)

**Option A - Manual:**
1. Download from: https://sourceforge.net/projects/phpqrcode/
2. Extract and find `qrlib.php`
3. Upload to: `/fineart-plugin/includes/lib/qr-code/qrlib.php`

**Option B - Composer:**
```bash
cd wp-content/plugins/fineart-plugin
composer require bacon/bacon-qr-code
```
Then update line 138 in `class-fineart-certificate-generator.php`:
```php
require_once FINEART_PATH . 'vendor/autoload.php';
```

### 2. Upload Plugin Files

Replace your existing plugin folder with the updated version.

### 3. Verify Test Mode

Open: `includes/certificates/class-fineart-certificate-generator.php`

Check lines 10-11:
```php
define('FINEART_CERTIFICATES_TEST_MODE', true);  // ← Should be true
define('FINEART_CERTIFICATES_TEST_EMAIL', 'loic.kernen@gmail.com'); // ← Your email
```

### 4. Flush Permalinks

1. Go to: **Settings → Permalinks**
2. Click **Save Changes** (don't change anything)
3. This enables `/certificate/xxx/` URLs

### 5. Test

1. Complete a test order
2. Check your email (test email address)
3. Click certificate link
4. Verify everything displays correctly
5. Test print function

## Post-Installation

### Set Upload Permissions

Ensure WordPress can write to uploads:
```bash
chmod 755 /wp-content/uploads/certificates/
```

### Monitor First Run

Check: **Tools → Site Health** for any PHP errors

### When Ready for Production

Edit: `includes/certificates/class-fineart-certificate-generator.php`

Change line 10:
```php
define('FINEART_CERTIFICATES_TEST_MODE', false);  // ← Change to false
```

## Quick Checks

✅ Plugin active in WordPress
✅ QR library installed
✅ Permalinks flushed
✅ Test mode enabled
✅ Test email correct
✅ Uploads folder writable

## Need Help?

See full documentation in: `CERTIFICATES-README.md`
