diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fe07b8..312ad0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to WooCommerce Tier and Package Prices will be documented in 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.1.15] - 2025-12-22 + +### Fixed + +- Settings page rendering twice in WooCommerce settings +- Duplicate instantiation of WC_TPP_Settings class causing double rendering + +### Technical Details + +- Removed conditional `if (class_exists('WC_TPP_Settings'))` wrapper from settings return statement +- Settings class now only instantiated via `return new WC_TPP_Settings();` when included by admin class +- Matches v1.1.2 pattern where settings file returns instance without automatic instantiation +- Prevents double registration in WooCommerce settings pages array + ## [1.1.14] - 2025-12-22 ### Fixed diff --git a/composer.json b/composer.json index 86b341d..20aef7f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "magdev/wc-tier-package-prices", "description": "WooCommerce plugin for tier pricing and package prices with Twig templates", - "version": "1.1.14", + "version": "1.1.15", "type": "wordpress-plugin", "license": "GPL-2.0-or-later", "authors": [ diff --git a/includes/class-wc-tpp-settings.php b/includes/class-wc-tpp-settings.php index dfd1938..a370e83 100644 --- a/includes/class-wc-tpp-settings.php +++ b/includes/class-wc-tpp-settings.php @@ -142,7 +142,4 @@ if (!class_exists('WC_TPP_Settings')) { } } -if (class_exists('WC_TPP_Settings')) { - return new WC_TPP_Settings(); -} -return null; +return new WC_TPP_Settings(); diff --git a/releases/wc-tier-and-package-prices-1.1.14.zip b/releases/wc-tier-and-package-prices-1.1.14.zip new file mode 100644 index 0000000..d025591 Binary files /dev/null and b/releases/wc-tier-and-package-prices-1.1.14.zip differ diff --git a/releases/wc-tier-and-package-prices-1.1.14.zip.md5 b/releases/wc-tier-and-package-prices-1.1.14.zip.md5 new file mode 100644 index 0000000..79759a1 --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.14.zip.md5 @@ -0,0 +1 @@ +e0cc51d1493ed35ab254220d9f46997b wc-tier-and-package-prices-1.1.14.zip diff --git a/releases/wc-tier-and-package-prices-1.1.14.zip.sha256 b/releases/wc-tier-and-package-prices-1.1.14.zip.sha256 new file mode 100644 index 0000000..fb72630 --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.14.zip.sha256 @@ -0,0 +1 @@ +8a2ce7438ee49baffdcaaf323b6426d73dd1cf704bea94a80fcce27a42c097ad wc-tier-and-package-prices-1.1.14.zip diff --git a/wc-tier-and-package-prices.php b/wc-tier-and-package-prices.php index 92f95c4..953a676 100644 --- a/wc-tier-and-package-prices.php +++ b/wc-tier-and-package-prices.php @@ -4,7 +4,7 @@ * Plugin Name: WooCommerce Tier and Package Prices * Plugin URI: https://src.bundespruefstelle.ch/magdev/wc-tier-package-prices * Description: Add tier pricing and package prices to WooCommerce products with configurable quantities at fixed prices - * Version: 1.1.14 + * Version: 1.1.15 * Author: Marco Graetsch * Author URI: https://src.bundespruefstelle.ch/magdev * Text Domain: wc-tier-package-prices @@ -23,7 +23,7 @@ if (!defined('ABSPATH')) { // Define plugin constants if (!defined('WC_TPP_VERSION')) { - define('WC_TPP_VERSION', '1.1.14'); + define('WC_TPP_VERSION', '1.1.15'); } if (!defined('WC_TPP_PLUGIN_DIR')) { define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__));