From 8cf081a9d132ec9fda3ba02d0e135d71627e106c Mon Sep 17 00:00:00 2001
From: Erik Thuning <boooink@gmail.com>
Date: Fri, 8 Mar 2024 16:40:55 +0100
Subject: [PATCH] Underscores in info field names are now changed to spaces
 when rendered. Not an ideal solution since underscores now can't be used in
 field names, but since it's PHP's POST handling getting in the way it'll have
 to do.

---
 include/ProductPage.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/ProductPage.php b/include/ProductPage.php
index 1933c95..3d0f72f 100644
--- a/include/ProductPage.php
+++ b/include/ProductPage.php
@@ -56,7 +56,8 @@ class ProductPage extends Page {
         }
         $info = '';
         foreach($this->product->get_info() as $key => $value) {
-            $info .= replace(array('name' => ucfirst($key),
+            $name = ucfirst(str_replace('_', ' ', $key));
+            $info .= replace(array('name' => $name,
                                    'key' => $key,
                                    'value' => $value),
                              $info_item_fragment);