From 669888817b9ef873b7048a818dd3654fa9a1a70e Mon Sep 17 00:00:00 2001 From: magdev Date: Wed, 31 Dec 2025 23:08:53 +0100 Subject: [PATCH] Bump version to 1.1.13 - fix product retrieval issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- CHANGELOG.md | 31 +++++++++++++++++++++++++++++++ wc-composable-product.php | 4 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 317f093..8be3539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,37 @@ 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.13] - 2025-12-31 + +### Fixed + +- **CRITICAL**: "No products available for selection" message showing even when products are configured +- Removed overly strict `is_in_stock()` requirement that was filtering out all products +- Products now show regardless of stock status (out-of-stock items are displayed but disabled) +- Added `'relation' => 'AND'` to meta_query for proper handling of multiple meta conditions + +### Changed + +- Product retrieval now shows all purchasable products, not just in-stock ones +- Stock status still displayed on frontend with appropriate styling +- Out-of-stock items shown but disabled via checkbox and visual indicators +- Frontend stock management from v1.1.0 still fully functional + +### Technical + +- Modified file: includes/Product_Type.php (lines 117-124, 177, 181) +- Changed from `$variation->is_in_stock() && $variation->is_purchasable()` to just `$variation->is_purchasable()` +- Changed from `$product->is_in_stock() && $product->is_purchasable()` to just `$product->is_purchasable()` +- Added `'relation' => 'AND'` to meta_query array for WordPress query compatibility + +### Notes + +- This fixes the issue where NO products were showing in the selector +- Stock validation still occurs at add-to-cart time (Stock_Manager class) +- Frontend still displays stock badges (in stock, low stock, out of stock) +- Out-of-stock items remain non-selectable via disabled checkboxes +- All translation files remain at 100% completion (57/57 strings) + ## [1.1.12] - 2025-12-31 ### Fixed diff --git a/wc-composable-product.php b/wc-composable-product.php index 6aa22e3..b46b303 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.12 + * Version: 1.1.13 * 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.12'); +define('WC_COMPOSABLE_PRODUCT_VERSION', '1.1.13'); define('WC_COMPOSABLE_PRODUCT_FILE', __FILE__); define('WC_COMPOSABLE_PRODUCT_PATH', plugin_dir_path(__FILE__)); define('WC_COMPOSABLE_PRODUCT_URL', plugin_dir_url(__FILE__));