# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.5] - 2025-12-04

### Fixed
- Compiled translation files (.mo) are now committed to repository for WordPress.org compatibility
- Translations now work correctly when installing from WordPress.org plugin directory

### Changed
- Removed `*.mo` from .gitignore to ensure translation files are version controlled
- Simplified build script by removing redundant translation compilation step

## [1.0.4] - 2025-12-04

### Fixed
- Fixed translations not loading - plugin now properly loads text domain
- Added automatic compilation of translation files (.mo) in build script
- Product type name now displays correctly in translated languages (e.g., "PhoneStamp Gavekort" in Danish)

## [1.0.3] - 2025-12-04

### Fixed
- Fixed General tab visibility when opening existing PhoneStamp gift card products
- Fixed Inventory tab incorrectly showing on page load for gift card products
- Improved tab visibility initialization to ensure correct tabs are shown/hidden on first load

## [1.0.2] - 2025-12-03

### Changed
- Simplified admin JavaScript by removing redundant wrapper functions
- Removed unnecessary setTimeout delays in variation field handling
- Improved tab visibility logic for gift card products on page load
- Cleaned up CSS rules to rely on WooCommerce's built-in show_if/hide_if system

### Fixed
- Attributes tab now displays correctly for all product types when switching product types
- Gift card product tabs now show correctly when opening existing products

## [1.0.1] - 2025-12-01

### Fixed
- Properly enqueue admin scripts using `wp_enqueue_script` instead of inline JavaScript
- Added nonce verification for gift card field inputs
- Restored "Used for variations" checkbox visibility for gift card products
- Improved UI cleanup when switching between product types

## [1.0.0] - 2025-11-19

### Added
- Nonce-protected storefront form for PhoneStamp gift cards
- WordPress.org-ready readme sections (highlights, screenshots, FAQs)
- Updated translation template and Danish translation for public release

### Changed
- Tightened sanitization/escaping when validating, displaying, and persisting gift card metadata
- Bumped compatibility headers (WordPress 6.5 / WooCommerce 8.4) and version constants

## [0.1.0] - 2025-11-16

### Added
- Custom gift card product type for WooCommerce
- Gift card recipient, sender and optional message collection
- Frontend gift card fields validation
- Cart and checkout integration for gift card data
- PhoneStamp namespace and plugin architecture
- Danish (da_DK) translation support
- Translation template (.pot) for future language additions

### Security
- Proper input sanitization and validation
- ABSPATH security checks
- Nonce verification for admin forms
- Output escaping for all user-facing content