You've already forked wc-tier-and-package-prices
Fixed persistent duplicate settings page by adding array-level duplicate detection in addition to singleton pattern from v1.1.16. Root Cause: - WooCommerce calls woocommerce_get_settings_pages filter multiple times - Even with singleton pattern, each filter call added settings instance to array - Singleton prevented multiple class instances but not multiple array entries Fixes: - Settings page rendering twice despite singleton pattern in v1.1.16 - Filter adding same settings instance to array on repeated calls Changes: - Added duplicate detection loop in add_settings_page() before array append - Uses strict comparison (===) to check if instance already in array - Returns early if settings page already present, preventing duplicate Technical Details: - foreach loop iterates through existing $settings array - Compares each element against cached self::$settings_instance - Only appends to array if instance not found - Complements singleton pattern with array-level protection - Handles WooCommerce calling filter multiple times during page load Updated Files: - includes/class-wc-tpp-admin.php (added duplicate check in filter) - wc-tier-and-package-prices.php (version 1.1.17) - composer.json (version 1.1.17) - CHANGELOG.md (v1.1.17 section) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
23 lines
542 B
JSON
23 lines
542 B
JSON
{
|
|
"name": "magdev/wc-tier-package-prices",
|
|
"description": "WooCommerce plugin for tier pricing and package prices with Twig templates",
|
|
"version": "1.1.17",
|
|
"type": "wordpress-plugin",
|
|
"license": "GPL-2.0-or-later",
|
|
"authors": [
|
|
{
|
|
"name": "Marco Graetsch",
|
|
"homepage": "https://src.bundespruefstelle.ch/magdev"
|
|
}
|
|
],
|
|
"require": {
|
|
"php": ">=7.4",
|
|
"twig/twig": "^3.0"
|
|
},
|
|
"autoload": {
|
|
"classmap": [
|
|
"includes/"
|
|
]
|
|
}
|
|
}
|