diff --git a/includes/Api/OrdersController.php b/includes/Api/OrdersController.php index 52b2d81..3b770ca 100644 --- a/includes/Api/OrdersController.php +++ b/includes/Api/OrdersController.php @@ -1295,8 +1295,8 @@ class OrdersController { $value = $term ? $term->name : $value; } } else { - // Custom attribute - WooCommerce stores as 'attribute_' + exact attribute name - $meta_key = 'attribute_' . $attr_name; + // Custom attribute - WooCommerce stores as 'attribute_' + lowercase sanitized name + $meta_key = 'attribute_' . sanitize_title( $attr_name ); $value = get_post_meta( $variation_id, $meta_key, true ); // Capitalize the attribute name for display