debug: Log all variation meta to find correct attribute storage key

Added logging to see ALL meta keys and values for variations.
This will show us exactly how WooCommerce stores the attribute values.

Check debug.log for:
Variation #362 ALL META: Array(...)

This will reveal the actual meta key format.
This commit is contained in:
dwindown
2025-11-20 01:02:14 +07:00
parent 86525a32e3
commit c397639176

View File

@@ -599,6 +599,10 @@ class ProductsController {
// Format attributes with human-readable names and values
$formatted_attributes = [];
// Debug: Log all meta for this variation
$all_meta = get_post_meta($variation_id);
error_log("Variation #{$variation_id} ALL META: " . print_r($all_meta, true));
// Get parent product attributes to know what to look for
$parent_attributes = $product->get_attributes();