• Like many others, I just updated to the latest version of WooCommerce, which killed a couple of my pages. Fortunately I only updated my test site, but unfortunately there are some issues that I cannot seem to resolve.

    I’m using a custom theme and have modified some of the template files after adding them to my theme folder. Previously, in my order-details.php file, I had:
    ‘<?php if ($order->order_custom_fields[“custom-order-number”][0]) : ?>
    <p>Order No.: <?php echo $order->order_custom_fields[“custom-order-number”][0]; ?></p>
    <?php endif; ?>
    <?php if ($order->order_custom_fields[“entered-by”][0]) : ?>
    <p>Entered by: <?php echo $order->order_custom_fields[“entered-by”][0]; ?></p>
    <?php endif; ?>’

    This allowed me to show the info from the custom checkout fields I have from using the WooCommerce extension “Checkout Field Editor.” Now, however, I get an error message “Fatal error: Cannot use string offset as an array in /home/chnzdevn/public_html/test/trade-orders/wp-content/themes/webmatters-platinum/woocommerce/order/order-details.php on line 20.” (Line 20 is the start of the code I’ve included above.)

    Any ideas what is going on?

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘Including custom fields on page no longer working’ is closed to new replies.