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:
@@ -599,6 +599,10 @@ class ProductsController {
|
|||||||
// Format attributes with human-readable names and values
|
// Format attributes with human-readable names and values
|
||||||
$formatted_attributes = [];
|
$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
|
// Get parent product attributes to know what to look for
|
||||||
$parent_attributes = $product->get_attributes();
|
$parent_attributes = $product->get_attributes();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user