You've already forked wc-tier-and-package-prices
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cfdbfe1504 |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -5,6 +5,21 @@ 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.9] - 2025-12-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- **CRITICAL:** Function redeclaration error for `wc_tpp_woocommerce_missing_notice()` affecting versions 1.1.3-1.1.8
|
||||
- Fatal error "Cannot redeclare function wc_tpp_woocommerce_missing_notice()" when plugin file loaded multiple times
|
||||
- Plugin activation and deactivation failures caused by function redeclaration
|
||||
|
||||
### Technical Details
|
||||
|
||||
- Wrapped `wc_tpp_woocommerce_missing_notice()` function in `function_exists()` check
|
||||
- Prevents fatal error during WordPress plugin activation/deactivation cycles
|
||||
- Ensures function can safely be declared even if file is included multiple times
|
||||
- Moved function declaration before WooCommerce check for better code organization
|
||||
|
||||
## [1.1.8] - 2025-12-22
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -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.8",
|
||||
"version": "1.1.9",
|
||||
"type": "wordpress-plugin",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"authors": [
|
||||
|
||||
BIN
releases/wc-tier-and-package-prices-1.1.8.zip
Normal file
BIN
releases/wc-tier-and-package-prices-1.1.8.zip
Normal file
Binary file not shown.
1
releases/wc-tier-and-package-prices-1.1.8.zip.md5
Normal file
1
releases/wc-tier-and-package-prices-1.1.8.zip.md5
Normal file
@@ -0,0 +1 @@
|
||||
666e1acad9f349982463b65d0e3e7fa3 wc-tier-and-package-prices-1.1.8.zip
|
||||
1
releases/wc-tier-and-package-prices-1.1.8.zip.sha256
Normal file
1
releases/wc-tier-and-package-prices-1.1.8.zip.sha256
Normal file
@@ -0,0 +1 @@
|
||||
2c100d0d100a6fd7bd8f9c9b154d878a675bc795c5fddb19314bc9991b9a60ba wc-tier-and-package-prices-1.1.8.zip
|
||||
BIN
releases/wc-tier-and-package-prices-1.1.9.zip
Normal file
BIN
releases/wc-tier-and-package-prices-1.1.9.zip
Normal file
Binary file not shown.
1
releases/wc-tier-and-package-prices-1.1.9.zip.md5
Normal file
1
releases/wc-tier-and-package-prices-1.1.9.zip.md5
Normal file
@@ -0,0 +1 @@
|
||||
7421aceb8d1cc89b7d15b19d68cdfabe wc-tier-and-package-prices-1.1.9.zip
|
||||
1
releases/wc-tier-and-package-prices-1.1.9.zip.sha256
Normal file
1
releases/wc-tier-and-package-prices-1.1.9.zip.sha256
Normal file
@@ -0,0 +1 @@
|
||||
8224bf8b9bfc3dc760d77c61700d27c31db1a67b70834d8b6a4581df66fd45bd wc-tier-and-package-prices-1.1.9.zip
|
||||
@@ -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.8
|
||||
* Version: 1.1.9
|
||||
* Author: Marco Graetsch
|
||||
* Author URI: https://src.bundespruefstelle.ch/magdev
|
||||
* Text Domain: wc-tier-package-prices
|
||||
@@ -22,7 +22,7 @@ if (!defined('ABSPATH')) {
|
||||
}
|
||||
|
||||
// Define plugin constants
|
||||
define('WC_TPP_VERSION', '1.1.8');
|
||||
define('WC_TPP_VERSION', '1.1.9');
|
||||
define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
||||
define('WC_TPP_PLUGIN_URL', plugin_dir_url(__FILE__));
|
||||
define('WC_TPP_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
||||
@@ -31,13 +31,9 @@ define('WC_TPP_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
||||
require_once WC_TPP_PLUGIN_DIR . 'vendor/autoload.php';
|
||||
|
||||
/**
|
||||
* Check if WooCommerce is active
|
||||
* Display WooCommerce missing notice
|
||||
*/
|
||||
if (!in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
||||
add_action('admin_notices', 'wc_tpp_woocommerce_missing_notice');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!function_exists('wc_tpp_woocommerce_missing_notice')) {
|
||||
function wc_tpp_woocommerce_missing_notice() {
|
||||
?>
|
||||
<div class="notice notice-error">
|
||||
@@ -45,6 +41,15 @@ function wc_tpp_woocommerce_missing_notice() {
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if WooCommerce is active
|
||||
*/
|
||||
if (!in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
||||
add_action('admin_notices', 'wc_tpp_woocommerce_missing_notice');
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main plugin class
|
||||
|
||||
Reference in New Issue
Block a user