You've already forked wc-composable-product
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1382490ec | |||
| f1b255a7f8 |
20
CHANGELOG.md
20
CHANGELOG.md
@@ -5,6 +5,26 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.1.2] - 2024-12-31
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **CRITICAL**: Fixed persistent "Class WC_Settings_Page not found" error that continued in v1.1.1
|
||||||
|
- Root cause: Settings.php was being included too early (during plugin init) before WC_Settings_Page was loaded
|
||||||
|
- Solution: Delayed Settings.php inclusion until `woocommerce_get_settings_pages` filter when class is guaranteed to exist
|
||||||
|
|
||||||
|
### Technical
|
||||||
|
|
||||||
|
- Removed `require_once Settings.php` from `Plugin::includes()` (line 93)
|
||||||
|
- Added `require_once Settings.php` to `Plugin::add_settings_page()` (line 196)
|
||||||
|
- Settings file now loads on-demand when WooCommerce requests settings pages
|
||||||
|
- Previous hook change (woocommerce_init) was insufficient - class loading order was the real issue
|
||||||
|
|
||||||
|
### Notes
|
||||||
|
|
||||||
|
- v1.1.1 attempted to fix this with hook change but the error persisted
|
||||||
|
- This version addresses the actual root cause: premature class extension
|
||||||
|
|
||||||
## [1.1.1] - 2024-12-31
|
## [1.1.1] - 2024-12-31
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ class Plugin {
|
|||||||
* Include required files
|
* Include required files
|
||||||
*/
|
*/
|
||||||
private function includes() {
|
private function includes() {
|
||||||
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Admin/Settings.php';
|
// Note: Settings.php is NOT included here because it extends WC_Settings_Page
|
||||||
|
// which isn't loaded until later. It's included in add_settings_page() instead.
|
||||||
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Admin/Product_Data.php';
|
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Admin/Product_Data.php';
|
||||||
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Product_Type.php';
|
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Product_Type.php';
|
||||||
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Stock_Manager.php';
|
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Stock_Manager.php';
|
||||||
@@ -191,6 +192,8 @@ class Plugin {
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function add_settings_page($settings) {
|
public function add_settings_page($settings) {
|
||||||
|
// Include Settings.php here, when WC_Settings_Page is guaranteed to be loaded
|
||||||
|
require_once WC_COMPOSABLE_PRODUCT_PATH . 'includes/Admin/Settings.php';
|
||||||
$settings[] = new Admin\Settings();
|
$settings[] = new Admin\Settings();
|
||||||
return $settings;
|
return $settings;
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
releases/wc-composable-product-v1.1.1.zip
Normal file
BIN
releases/wc-composable-product-v1.1.1.zip
Normal file
Binary file not shown.
1
releases/wc-composable-product-v1.1.1.zip.md5
Normal file
1
releases/wc-composable-product-v1.1.1.zip.md5
Normal file
@@ -0,0 +1 @@
|
|||||||
|
db09928aea6fffbf9c2e754d2264f2bc wc-composable-product-v1.1.1.zip
|
||||||
1
releases/wc-composable-product-v1.1.1.zip.sha256
Normal file
1
releases/wc-composable-product-v1.1.1.zip.sha256
Normal file
@@ -0,0 +1 @@
|
|||||||
|
761eef69da910ecfdb20ceeed70b5d0381c7cab895e81a040d132cb0f88d749b wc-composable-product-v1.1.1.zip
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: WooCommerce Composable Products
|
* Plugin Name: WooCommerce Composable Products
|
||||||
* Plugin URI: https://github.com/magdev/wc-composable-product
|
* Plugin URI: https://github.com/magdev/wc-composable-product
|
||||||
* Description: Create composable products where customers select a limited number of items from a configurable set
|
* Description: Create composable products where customers select a limited number of items from a configurable set
|
||||||
* Version: 1.1.1
|
* Version: 1.1.2
|
||||||
* Author: Marco Graetsch
|
* Author: Marco Graetsch
|
||||||
* Author URI: https://example.com
|
* Author URI: https://example.com
|
||||||
* License: GPL v3 or later
|
* License: GPL v3 or later
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
defined('ABSPATH') || exit;
|
defined('ABSPATH') || exit;
|
||||||
|
|
||||||
// Define plugin constants
|
// Define plugin constants
|
||||||
define('WC_COMPOSABLE_PRODUCT_VERSION', '1.1.1');
|
define('WC_COMPOSABLE_PRODUCT_VERSION', '1.1.2');
|
||||||
define('WC_COMPOSABLE_PRODUCT_FILE', __FILE__);
|
define('WC_COMPOSABLE_PRODUCT_FILE', __FILE__);
|
||||||
define('WC_COMPOSABLE_PRODUCT_PATH', plugin_dir_path(__FILE__));
|
define('WC_COMPOSABLE_PRODUCT_PATH', plugin_dir_path(__FILE__));
|
||||||
define('WC_COMPOSABLE_PRODUCT_URL', plugin_dir_url(__FILE__));
|
define('WC_COMPOSABLE_PRODUCT_URL', plugin_dir_url(__FILE__));
|
||||||
|
|||||||
Reference in New Issue
Block a user