diff --git a/CHANGELOG.md b/CHANGELOG.md index 086d74c..98a35a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ 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.1.1] - 2024-12-31 + +### Fixed + +- Settings page initialization timing issue causing "Class WC_Settings_Page not found" error +- Changed hook from `woocommerce_loaded` to `woocommerce_init` to ensure WC_Settings_Page class is available +- Plugin now initializes after all WooCommerce core classes are loaded + +### Technical + +- Hook changed from `woocommerce_loaded` to `woocommerce_init` in wc-composable-product.php:65 +- `woocommerce_init` fires after WooCommerce has finished loading all its core classes including settings + ## [1.1.0] - 2024-12-31 ### Added diff --git a/wc-composable-product.php b/wc-composable-product.php index 1a45637..6098f04 100644 --- a/wc-composable-product.php +++ b/wc-composable-product.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce Composable Products * 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 - * Version: 1.1.0 + * Version: 1.1.1 * Author: Marco Graetsch * Author URI: https://example.com * License: GPL v3 or later @@ -19,7 +19,7 @@ defined('ABSPATH') || exit; // Define plugin constants -define('WC_COMPOSABLE_PRODUCT_VERSION', '1.1.0'); +define('WC_COMPOSABLE_PRODUCT_VERSION', '1.1.1'); define('WC_COMPOSABLE_PRODUCT_FILE', __FILE__); define('WC_COMPOSABLE_PRODUCT_PATH', plugin_dir_path(__FILE__)); define('WC_COMPOSABLE_PRODUCT_URL', plugin_dir_url(__FILE__)); @@ -61,8 +61,8 @@ function wc_composable_product_init() { // Initialize main plugin class WC_Composable_Product\Plugin::instance(); } -// Use woocommerce_loaded to ensure WooCommerce classes are available -add_action('woocommerce_loaded', 'wc_composable_product_init'); +// Use woocommerce_init to ensure all WooCommerce classes including settings are loaded +add_action('woocommerce_init', 'wc_composable_product_init'); /** * Activation hook