• Resolved hotcookie

    (@hotcookie)


    Your HPOS meta data implementation assumes all meta data is a string. I have a meta data element that is an array. The following error is in the order meta data:

    Warning: Array to string conversion in?/Users/anton/Sites/hotcookielocal/wp-includes/formatting.php?on line?1096
    Array

    ` WordPress Environment</p> <p>WordPress address (URL): https://hotcookie.local<br>Site address (URL): https://hotcookie.local<br>WC Version: 9.1.4<br>Legacy REST API Package Version: The Legacy REST API plugin is not installed on this site.<br>Action Scheduler Version: ? 3.7.4<br>Log Directory Writable: ?<br>WP Version: 6.6.1<br>WP Multisite: –<br>WP Memory Limit: 1 GB<br>WP Debug Mode: ?<br>WP Cron: ?<br>Language: en_US<br>External object cache: – Server Environment</p> <p>Server Info: Apache/2.4.54 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141 OpenSSL/1.0.2u mod_wsgi/3.5 Python/2.7.18<br>PHP Version: 8.0.23<br>PHP Post Max Size: 8 MB<br>PHP Time Limit: 60<br>PHP Max Input Vars: 1000<br>cURL Version: 7.68.0<br>OpenSSL/1.0.2u</p> <p>SUHOSIN Installed: –<br>MySQL Version: 5.7.39<br>Max Upload Size: 8 MB<br>Default Timezone is UTC: ?<br>fsockopen/cURL: ?<br>SoapClient: ?<br>DOMDocument: ?<br>GZip: ?<br>Multibyte String: ?<br>Remote Post: ?<br>Remote Get: ? Database</p> <p>WC Database Version: 8.8.5<br>WC Database Prefix: wp_<br>Total Database Size: 581.46MB<br>Database Data Size: 370.09MB<br>Database Index Size: 211.37MB<br>wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_woocommerce_order_items: Data: 2.52MB + Index: 1.00MB + Engine InnoDB<br>wp_woocommerce_order_itemmeta: Data: 15.55MB + Index: 14.03MB + Engine InnoDB<br>wp_woocommerce_tax_rates: Data: 0.16MB + Index: 0.22MB + Engine InnoDB<br>wp_woocommerce_tax_rate_locations: Data: 0.14MB + Index: 0.16MB + Engine InnoDB<br>wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_payment_tokens: Data: 0.08MB + Index: 0.02MB + Engine InnoDB<br>wp_woocommerce_payment_tokenmeta: Data: 0.20MB + Index: 0.25MB + Engine InnoDB<br>wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_actions: Data: 1.52MB + Index: 1.00MB + Engine InnoDB<br>wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_actionscheduler_logs: Data: 1.52MB + Index: 0.56MB + Engine InnoDB<br>wp_automatewoo_abandoned_carts: Data: 0.02MB + Index: 0.08MB + Engine InnoDB<br>wp_automatewoo_customers: Data: 0.50MB + Index: 1.09MB + Engine InnoDB<br>wp_automatewoo_customer_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_automatewoo_guests: Data: 0.02MB + Index: 0.06MB + Engine InnoDB<br>wp_automatewoo_guest_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_automatewoo_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_automatewoo_log_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_automatewoo_queue: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_automatewoo_queue_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_comments: Data: 6.52MB + Index: 9.09MB + Engine InnoDB<br>wp_followup_coupons: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_followup_coupon_logs: Data: 0.02MB + Index: 0.05MB + Engine InnoDB<br>wp_followup_customers: Data: 0.25MB + Index: 0.48MB + Engine InnoDB<br>wp_followup_customer_carts: Data: 4.52MB + Index: 0.48MB + Engine InnoDB<br>wp_followup_customer_notes: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_followup_customer_orders: Data: 0.22MB + Index: 0.16MB + Engine InnoDB<br>wp_followup_email_excludes: Data: 0.11MB + Index: 0.17MB + Engine InnoDB<br>wp_followup_email_logs: Data: 11.52MB + Index: 6.55MB + Engine InnoDB<br>wp_followup_email_orders: Data: 103.64MB + Index: 15.09MB + Engine InnoDB<br>wp_followup_email_tracking: Data: 7.52MB + Index: 10.58MB + Engine InnoDB<br>wp_followup_followup_history: Data: 21.55MB + Index: 6.55MB + Engine InnoDB<br>wp_followup_order_categories: Data: 1.52MB + Index: 3.03MB + Engine InnoDB<br>wp_followup_order_items: Data: 0.48MB + Index: 0.89MB + Engine InnoDB<br>wp_followup_subscribers: Data: 0.39MB + Index: 0.42MB + Engine InnoDB<br>wp_followup_subscribers_to_lists: Data: 0.23MB + Index: 0.28MB + Engine InnoDB<br>wp_followup_subscriber_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_gf_draft_submissions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_gf_entry: Data: 1.52MB + Index: 0.20MB + Engine InnoDB<br>wp_gf_entry_meta: Data: 5.52MB + Index: 3.20MB + Engine InnoDB<br>wp_gf_entry_notes: Data: 1.52MB + Index: 0.17MB + Engine InnoDB<br>wp_gf_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_gf_form_meta: Data: 0.08MB + Index: 0.00MB + Engine InnoDB<br>wp_gf_form_revisions: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_gf_form_view: Data: 0.17MB + Index: 0.16MB + Engine InnoDB<br>wp_gf_rest_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_newsletter: Data: 2.52MB + Index: 0.55MB + Engine InnoDB<br>wp_newsletter_emails: Data: 1.52MB + Index: 0.00MB + Engine InnoDB<br>wp_newsletter_logs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_newsletter_sent: Data: 5.52MB + Index: 5.03MB + Engine InnoDB<br>wp_newsletter_stats: Data: 5.52MB + Index: 4.03MB + Engine InnoDB<br>wp_newsletter_user_logs: Data: 0.34MB + Index: 0.00MB + Engine InnoDB<br>wp_newsletter_user_meta: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_options: Data: 1.52MB + Index: 0.45MB + Engine InnoDB<br>wp_postmeta: Data: 38.58MB + Index: 41.14MB + Engine InnoDB<br>wp_posts: Data: 4.52MB + Index: 2.55MB + Engine InnoDB<br>wp_post_smtp_logmeta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_post_smtp_logs: Data: 8.52MB + Index: 0.00MB + Engine InnoDB<br>wp_simple_history: Data: 0.23MB + Index: 0.17MB + Engine InnoDB<br>wp_simple_history_contexts: Data: 1.52MB + Index: 1.88MB + Engine InnoDB<br>wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_taxjar_record_queue: Data: 0.41MB + Index: 0.22MB + Engine InnoDB<br>wp_termmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>wp_terms: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>wp_term_relationships: Data: 0.17MB + Index: 0.11MB + Engine InnoDB<br>wp_term_taxonomy: Data: 0.05MB + Index: 0.03MB + Engine InnoDB<br>wp_usermeta: Data: 17.55MB + Index: 20.06MB + Engine InnoDB<br>wp_users: Data: 1.52MB + Index: 0.91MB + Engine InnoDB<br>wp_wcpdf_invoice_number: Data: 0.19MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_admin_notes: Data: 0.13MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_admin_note_actions: Data: 0.09MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_customer_lookup: Data: 1.52MB + Index: 0.47MB + Engine InnoDB<br>wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_orders: Data: 2.52MB + Index: 1.72MB + Engine InnoDB<br>wp_wc_orders_meta: Data: 20.55MB + Index: 45.31MB + Engine InnoDB<br>wp_wc_order_addresses: Data: 2.52MB + Index: 1.59MB + Engine InnoDB<br>wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB<br>wp_wc_order_operational_data: Data: 1.52MB + Index: 0.45MB + Engine InnoDB<br>wp_wc_order_product_lookup: Data: 2.52MB + Index: 3.77MB + Engine InnoDB<br>wp_wc_order_stats: Data: 1.52MB + Index: 0.58MB + Engine InnoDB<br>wp_wc_order_tax_lookup: Data: 0.22MB + Index: 0.23MB + Engine InnoDB<br>wp_wc_product_attributes_lookup: Data: 0.11MB + Index: 0.13MB + Engine InnoDB<br>wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_product_meta_lookup: Data: 0.06MB + Index: 0.11MB + Engine InnoDB<br>wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB<br>wp_wfpklist_template_data: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_woocommerce_square_customers: Data: 18.58MB + Index: 0.00MB + Engine InnoDB<br>wp_wpfront_ure_login_redirect: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wpfront_ure_options: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB<br>wp_wpmailsmtp_emails_log: Data: 37.56MB + Index: 2.91MB + Engine InnoDB<br>wp_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB Post Type Counts</p> <p>acf-field: 88<br>acf-field-group: 13<br>attachment: 571<br>custom_css: 1<br>follow_up_email: 33<br>nav_menu_item: 38<br>page: 48<br>post: 83<br>product: 137<br>product_variation: 218<br>revision: 1607<br>shop_coupon: 36<br>shop_order: 5622<br>shop_order_placehold: 5<br>shop_order_refund: 225<br>shop_subscription: 8<br>wcccf: 3<br>wccpf: 1<br>wp_global_styles: 1 Security</p> <p>Secure connection (HTTPS): ?<br>Hide errors from visitors: ?Error messages should not be shown to visitors. Active Plugins (36)</p> <p>Gravity Forms: by Gravity Forms – 2.8.15<br>Advanced Custom Fields PRO: by WP Engine – 6.3.5<br>Classic Editor: by WordPress Contributors – 1.6.4<br>Clear OPcache Plugin: by Binary Cocoa – 0.5<br>CookieYes | GDPR Cookie Consent: by CookieYes – 3.2.5<br>Site Kit by Google: by Google – 1.132.0<br>Health Check & Troubleshooting: by The www.ads-software.com community – 1.7.1<br>Hotcookie Order Manager: by Anton Roug – 1.5<br>Hotcookie Shipping: by Anton Roug – 1.5<br>Import and export users and customers: by codection – 1.26.10<br>Media Library Assistant: by David Lingren – 3.18<br>Newsletter – Woocommerce Account Preferences: by Anton Roug – 1.0<br>Newsletter – Amazon SES: by The Newsletter Team – 1.5.3<br>Newsletter – Addons Manager and Support: by The Newsletter Team – 1.3.0<br>Newsletter – Import/Export: by The Newsletter Team – 1.5.2<br>Newsletter – Reports and Retargeting: by The Newsletter Team – 4.5.9<br>Newsletter – WooCommerce: by The Newsletter Team – 1.9.5<br>Newsletter – WP Users Addon: by The Newsletter Team – 1.4.5<br>Newsletter: by Stefano Lissa & The Newsletter Team – 8.4.7<br>Post SMTP: by Post SMTP – 2.9.7<br>Prepaid for WooCommerce Subscriptions: by Meow Crew – 4.1.3<br>Simple History: by P?r Thernstr?m – 4.17.0<br>TaxJar – Sales Tax Automation for WooCommerce: by TaxJar – 4.2.2<br>User Role Editor: by Vladimir Garagulya – 4.64.2<br>User Switching: by John Blackbourn – 1.8.0<br>Username Changer: by Widgit Team – 3.2.2<br>Advanced Order Export For WooCommerce: by AlgolPlus – 3.5.3<br>WooCommerce.com Update Manager: by Automattic – 1.0.3<br>Woo Min/Max Quantities: by Woo – 4.3.1<br>Woo Product Add-ons: by Woo – 6.8.3<br>WooCommerce Square: by WooCommerce – 4.7.2<br>Store Toolkit for WooCommerce: by Visser Labs – 2.4.0<br>WooCommerce Subscriptions: by WooCommerce – 6.5.0<br>WooCommerce: by Automattic – 9.1.4<br>WP Migrate: by WP Engine – 2.6.13<br>WPS Hide Login: by WPServeur<br>NicolasKulka<br>wpformation – 1.9.16.7 Inactive Plugins (4)</p> <p>Newsletter – Gravity Forms Addon: by The Newsletter Team – 1.1.5<br>WP-Optimize – Clean, Compress, Cache: by David Anderson<br>Ruhani Rabin<br>Team Updraft – 3.4.2</p> <p>WP Crontrol: by John Blackbourn – 1.17.0<br>WP Mail SMTP Pro: by WPForms – 3.5.1 Must Use Plugins (3)</p> <p>Health Check Troubleshooting Mode: by – 1.9.2<br>hotcookie.php: by –<br>WP Migrate Compatibility: by Delicious Brains – 1.3 Settings</p> <p>API Enabled: –<br>Force SSL: ?<br>Currency: USD ($)<br>Currency Position: left<br>Thousand Separator: ,<br>Decimal Separator: .<br>Number of Decimals: 2<br>Taxonomies: Product Types: external (external)<br>grouped (grouped)<br>simple (simple)<br>subscription (subscription)<br>variable (variable)<br>variable subscription (variable-subscription)</p> <p>Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)<br>exclude-from-search (exclude-from-search)<br>featured (featured)<br>outofstock (outofstock)<br>rated-1 (rated-1)<br>rated-2 (rated-2)<br>rated-3 (rated-3)<br>rated-4 (rated-4)<br>rated-5 (rated-5)</p> <p>Connected to WooCommerce.com: ?<br>Enforce Approved Product Download Directories: –<br>HPOS feature enabled: ?<br>Order datastore: Automattic\WooCommerce\Internal\DataStores\Orders\OrdersTableDataStore<br>HPOS data sync enabled: – Logging</p> <p>Enabled: ?<br>Handler: Automattic\WooCommerce\Internal\Admin\Logging\LogHandlerFileV2<br>Retention period: 30 days<br>Level threshold: –<br>Log directory size: 56 MB WC Pages</p> <p>Shop base: #6 – /shop/<br>Cart: #7 – /shop/cart/ – Contains the [woocommerce_cart] shortcode<br>Checkout: #8 – /shop/checkout/ – Contains the [woocommerce_checkout] shortcode<br>My account: #9 – /account/<br>Terms and conditions: #109 – /policies/terms-conditions/ Theme</p> <p>Name: Hot Cookie Bakery<br>Version: 1.5<br>Author URL:<br>Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme<br>WooCommerce Support: ? Templates</p> <p>Archive Template: Your theme has a woocommerce.php file<br>you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.</p> <p>Overrides: hotcookiebakery/woocommerce/emails/email-addresses.php version 5.6.0 is out of date. The core version is 8.6.0<br>hotcookiebakery/woocommerce/emails/email-order-details.php<br>hotcookiebakery/woocommerce/emails/plain/email-addresses.php version 5.6.0 is out of date. The core version is 8.6.0<br>hotcookiebakery/woocommerce/emails/plain/email-order-details.php<br>hotcookiebakery/woocommerce/order/order-details-customer.php version 5.6.0 is out of date. The core version is 8.7.0<br>hotcookiebakery/woocommerce/order/order-details.php version 7.8.0 is out of date. The core version is 9.0.0<br>hotcookiebakery/woocommerce/single-product/title.php</p> <p>Outdated Templates: ?</p> <pre class=”wp-block-code”><code> Learn how to update</code></pre> <p>Templates</p> <p>thumbnail:<br>medium:<br>medium_large:<br>large:<br>1536×1536:<br>2048×2048:<br>woocommerce_thumbnail:<br>woocommerce_single:<br>woocommerce_gallery_thumbnail: Subscriptions</p> <p>WCS_DEBUG: ? No<br>Subscriptions Mode: ? Staging<br>Subscriptions Live URL: https://hotcookie.com<br>Subscriptions-core Library Version: 7.3.0<br>Subscriptions Template Theme Overrides: hotcookiebakery/woocommerce/checkout/recurring-totals.php<br>hotcookiebakery/woocommerce/emails/email-order-details.php<br>hotcookiebakery/woocommerce/emails/plain/email-order-details.php</p> <p>Subscription Statuses: wc-active: 7<br>wc-cancelled: 1</p> <p>WooCommerce Account Connected: ? Yes<br>Active Product Key: ? Yes<br>Report Cache Enabled: ? Yes<br>Cache Update Failures: ? 0 failure Store Setup</p> <p>Country / State: United States (US) — California Subscriptions by Payment Gateway</p> <p>Square: wc-active: 7<br>wc-cancelled: 1 Payment Gateway Support</p> <p>Square: products<br>card_types<br>payment_form<br>authorization<br>charge<br>charge-virtual<br>capture_charge<br>refunds<br>voids<br>customer_id<br>tokenization<br>add_payment_method<br>token_editor<br>subscriptions<br>subscription_suspension<br>subscription_cancellation<br>subscription_reactivation<br>subscription_amount_changes<br>subscription_date_changes<br>multiple_subscriptions<br>subscription_payment_method_change_customer<br>subscription_payment_method_change_admin Square</p> <p>Environment: Production<br>Tokenization Enabled: ?<br>Debug Mode: Off Admin</p> <p>Enabled Features: activity-panels<br>analytics<br>product-block-editor<br>coupons<br>core-profiler<br>customize-store<br>customer-effort-score-tracks<br>import-products-task<br>experimental-fashion-sample-products<br>shipping-smart-defaults<br>shipping-setting-tour<br>homescreen<br>marketing<br>mobile-app-banner<br>navigation<br>onboarding<br>onboarding-tasks<br>product-custom-fields<br>remote-inbox-notifications<br>remote-free-extensions<br>payment-gateway-suggestions<br>shipping-label-banner<br>subscriptions<br>store-alerts<br>transient-notices<br>woo-mobile-welcome<br>wc-pay-promotion<br>wc-pay-welcome-page<br>launch-your-store</p> <p>Disabled Features: experimental-blocks<br>minified-js<br>pattern-toolkit-full-composability<br>product-pre-publish-modal<br>printful<br>settings<br>async-product-editor-category-field<br>product-editor-template-system</p> <p>Daily Cron: ? Next scheduled: 2024-08-05 21:19:22 -07:00<br>Options: ?<br>Notes: 210<br>Onboarding: completed Action Scheduler</p> <p>Complete: 2,702<br>Oldest: 2024-07-05 08:34:02 -0700<br>Newest: 2024-08-05 08:24:52 -0700</p> <p>Failed: 72<br>Oldest: 2021-10-25 15:52:52 -0700<br>Newest: 2024-01-31 22:14:02 -0800</p> <p>Pending: 17<br>Oldest: 2024-08-05 08:29:29 -0700<br>Newest: 2025-04-24 20:21:52 -0700 Status report information</p> <p>Generated at: 2024-08-05 08:27:32 -07:00<br>`

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Josh Kohlbach

    (@jkohlbach)

    Hi @hotcookie, would love to confirm exactly where you’re seeing this issue? Is it when you’re opening the Order edit screen? Are they regular orders?

    In the template for this meta box we are checking if the data is an array and print it accordingly using print_r.

    Thread Starter hotcookie

    (@hotcookie)

    Its when I open the order edit.
    Your hpos implementation also doesn’t dump all the five order item data.
    I fixed both of the problems. Here are the source files

    order_data.php

    <?php
    // Exit if accessed directly.
    if ( ! defined( 'ABSPATH' ) ) {
    exit;
    }

    if ( ! empty( $order_data ) ) : ?>
    <table class="widefat striped" style="font-family:monospace; text-align:left; width:100%;">
    <tbody>
    <?php foreach ( $order_data as $key => $data ) : ?>
    <?php if ( 'meta_data' === $key ) : ?>
    <?php foreach ( $data as $meta ) : ?>
    <tr>
    <th style="width:20%;"><?php echo 'meta_data[' . esc_html( $meta->get_data()['key'] ) . ']'; ?></th>
    <td>
    <?php
    $data = $meta->get_data()['value'];
    switch ( $data ) {
    case is_array( $data ):
    echo '<pre>' . esc_html( print_r( $data, true ) ) . '</pre>';
    break;
    case is_object( $data ):
    echo '<pre>' . esc_html( print_r( $data, true ) ) . '</pre>';
    break;
    default:
    echo esc_html( $data );
    break;
    }
    ?>
    </td>
    </tr>
    <?php endforeach; ?>
    <?php else: ?>
    <tr>
    <th style="width:20%;"><?php echo esc_html( $key ); ?></th>
    <td>
    <?php
    switch ( $data ) {
    case is_array( $data ):
    echo '<pre>' . esc_html( print_r( $data, true ) ) . '</pre>';
    break;
    case is_object( $data ):
    echo '<pre>' . esc_html( print_r( $data, true ) ) . '</pre>';
    break;
    default:
    echo esc_html( $data );
    break;
    }
    ?>
    </td>
    </tr>
    <?php endif; ?>
    <?php endforeach; ?>
    </tbody>
    </table>
    <?php else : ?>
    <p>No order data is associated with this Order.</p>
    <?php endif; ?>

    meta_box.php

    <?php
    use Automattic\WooCommerce\Utilities\OrderUtil;
    use Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController;

    require_once WOO_ST_PATH . 'includes/admin/meta_box.php';

    function woo_st_add_data_meta_boxes( $post_type, $post = '' ) {

    if ( get_post_status( $post ) == 'auto-draft' ) {
    return;
    }

    // Product
    $post_type = 'product';
    if ( apply_filters( 'woo_st_product_data_meta_box', true ) ) {
    add_meta_box( 'woo-product-post_data', __( 'Product Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_product_data_meta_box', $post_type, 'normal', 'default' );
    }
    $post_type = 'product_variation';
    if ( apply_filters( 'woo_st_product_data_meta_box', true ) ) {
    add_meta_box( 'woo-product-post_data', __( 'Product Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_product_data_meta_box', $post_type, 'normal', 'default' );
    }

    // Order
    $post_type = 'shop_order';
    $post_type = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
    ? wc_get_page_screen_id( 'shop-order' )
    : 'shop_order';

    $order_meta_box_title = wc_get_container()->get( CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
    ? array(
    'order' => __( 'Order Data', 'woocommerce-store-toolkit' ),
    'items' => __( 'Order Items Data', 'woocommerce-store-toolkit' ),
    'refunds' => __( 'Refunds Data', 'woocommerce-store-toolkit' ),
    ) : array(
    'order' => __( 'Order Post Meta', 'woocommerce-store-toolkit' ),
    'items' => __( 'Order Items Meta', 'woocommerce-store-toolkit' ),
    'refunds' => __( 'Refunds Post Meta', 'woocommerce-store-toolkit' ),
    );

    if ( apply_filters( 'woo_st_order_data_meta_box', true ) ) {
    add_meta_box( 'woo-order-post_data', $order_meta_box_title['order'], 'woo_st_order_data_meta_box', $post_type, 'normal', 'default' );
    }
    if ( apply_filters( 'woo_st_order_items_data_meta_box', true ) ) {
    add_meta_box( 'woo-order-post_item', $order_meta_box_title['items'], 'woo_st_order_items_data_meta_box', $post_type, 'normal', 'default' );
    }
    if ( apply_filters( 'woo_st_order_refunds_data_meta_box', true ) ) {
    add_meta_box( 'woo-order-post_refund', $order_meta_box_title['refunds'], 'woo_st_order_refunds_data_meta_box', $post_type, 'normal', 'default' );
    }

    // So we can view the Related Orders meta box on the Edit Order screen
    $unlock_related_orders = get_option( WOO_ST_PREFIX . '_unlock_related_orders', 0 );
    if (
    ! empty( $unlock_related_orders ) ||
    apply_filters( 'woo_st_order_related_orders_meta_box', false )
    ) {
    add_meta_box( 'woo-order-related_orders', __( 'Related Orders', 'woocommerce-store-toolkit' ), 'woo_st_order_related_orders_meta_box', $post_type, 'side', 'default' );
    }

    // Coupon
    $post_type = 'shop_coupon';
    if ( apply_filters( 'woo_st_coupon_data_meta_box', true ) ) {
    add_meta_box( 'woo-coupon-post_data', __( 'Coupon Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_coupon_data_meta_box', $post_type, 'normal', 'default' );
    }

    // Attachment
    $post_type = 'attachment';
    if ( apply_filters( 'woo_st_attachment_data_meta_box', true ) ) {
    add_meta_box( 'attachment-post_data', __( 'Attachment Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_attachment_data_meta_box', $post_type, 'normal', 'default' );
    }

    // 3rd party

    // WooCommerce Subscriptions - https://www.woothemes.com/products/woocommerce-subscriptions/
    $post_type = 'shop_subscription';
    if ( post_type_exists( $post_type ) ) {
    if ( apply_filters( 'woo_st_order_data_meta_box', true ) ) {
    add_meta_box( 'woo-order-post_data', __( 'Subscription Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_order_data_meta_box', $post_type, 'normal', 'default' );
    }
    }

    // WooCommerce - Store Exporter Deluxe - https://www.visser.com.au/plugins/store-exporter-deluxe/
    $post_type = 'scheduled_export';
    if ( post_type_exists( $post_type ) ) {
    if ( apply_filters( 'woo_st_scheduled_export_data_meta_box', true ) ) {
    add_meta_box( 'woo-scheduled_export-post_data', __( 'Scheduled Export Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_scheduled_export_data_meta_box', $post_type, 'normal', 'default' );
    }
    }

    // WooCommerce - Store Exporter Deluxe - https://www.visser.com.au/plugins/store-exporter-deluxe/
    $post_type = 'export_template';
    if ( apply_filters( 'woo_st_export_template_data_meta_box', true ) ) {
    add_meta_box( 'woo-coupon-post_data', __( 'Export Template Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_export_template_data_meta_box', $post_type, 'normal', 'default' );
    }

    // WooCommerce - Product Importer Deluxe - https://www.visser.com.au/plugins/product-importer-deluxe/
    $post_type = 'scheduled_import';
    if ( post_type_exists( $post_type ) ) {
    if ( apply_filters( 'woo_st_scheduled_import_data_meta_box', true ) ) {
    add_meta_box( 'woo-scheduled_import-post_data', __( 'Scheduled Import Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_scheduled_export_data_meta_box', $post_type, 'normal', 'default' );
    }
    }

    // WooCommerce Events - https://www.woocommerceevents.com/
    if ( class_exists( 'WooCommerce_Events' ) ) {
    $post_type = 'event_magic_tickets';
    if ( apply_filters( 'woo_st_event_data_meta_box', true ) ) {
    add_meta_box( 'woo-event-post_data', __( 'Event Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_event_data_meta_box', $post_type, 'normal', 'default' );
    }
    }

    // WooCommerce Bookings - https://www.woothemes.com/products/woocommerce-bookings/
    if ( class_exists( 'WC_Bookings' ) ) {
    $post_type = 'wc_booking';
    if ( apply_filters( 'woo_st_booking_data_meta_box', true ) ) {
    add_meta_box( 'woo-booking-post_data', __( 'Booking Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_booking_data_meta_box', $post_type, 'normal', 'default' );
    }
    }

    // WooCommerce Memberships - https://www.woothemes.com/products/woocommerce-memberships/
    if ( function_exists( 'init_woocommerce_memberships' ) ) {
    $post_type = 'wc_user_membership';
    if ( apply_filters( 'woo_st_user_membership_data_meta_box', true ) ) {
    add_meta_box( 'woo-user_membership-post_data', __( 'User Membership Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_user_membership_data_meta_box', $post_type, 'normal', 'low' );
    }
    $post_type = 'wc_membership_plan';
    if ( apply_filters( 'woo_st_membership_plan_data_meta_box', true ) ) {
    add_meta_box( 'woo-membership_plan-post_data', __( 'Membership Plan Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_membership_plan_data_meta_box', $post_type, 'normal', 'low' );
    }
    // These guys think they are special...
    add_filter( 'wc_memberships_allowed_meta_box_ids', 'woo_st_extend_wc_memberships_allowed_meta_box_ids' );
    }

    // WooCommerce Appointments - https://www.bizzthemes.com/plugins/woocommerce-appointments/
    if ( class_exists( 'WC_Appointments' ) ) {
    $post_type = 'wc_appointment';
    if ( apply_filters( 'woo_st_appointment_data_meta_box', true ) ) {
    add_meta_box( 'woo-appointment-post_data', __( 'Appointment Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_generic_data_meta_box', $post_type, 'normal', 'low' );
    }
    }

    // Advanced Custom Fields - https://www.advancedcustomfields.com
    if ( class_exists( 'acf' ) ) {
    $acf_version = ( defined( 'ACF_VERSION' ) ? ACF_VERSION : false );
    if ( version_compare( $acf_version, '5.6', '>=' ) ) {
    $post_type = 'acf-field-group';
    } else {
    $post_type = 'acf';
    }
    if ( apply_filters( 'woo_st_acf_data_meta_box', true ) ) {
    add_meta_box( 'woo-acf-post_data', __( 'ACF Post Meta', 'woocommerce-store-toolkit' ), 'woo_st_generic_data_meta_box', $post_type, 'normal', 'low' );
    }
    }
    }

    // WooCommerce Memberships - https://www.woothemes.com/products/woocommerce-memberships/
    function woo_st_extend_wc_memberships_allowed_meta_box_ids( $meta_boxes ) {

    $meta_boxes[] = 'woo-user_membership-post_data';
    $meta_boxes[] = 'woo-membership_plan-post_data';
    return $meta_boxes;
    }

    function woo_st_product_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'product';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_order_data_meta_box( $post_or_order_object ) {

    if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
    $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
    $order_data = $order->get_data();

    // Unset line items, tax lines, shipping lines, fee lines, coupon lines and refunds.
    unset( $order_data['line_items'] );
    unset( $order_data['tax_lines'] );
    unset( $order_data['shipping_lines'] );
    unset( $order_data['fee_lines'] );
    unset( $order_data['coupon_lines'] );
    unset( $order_data['refunds'] );

    $template = 'order_data.php';
    } else {
    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );
    $post_meta = get_post_custom( $post_id );
    $type = 'order';
    $template = 'post_data.php';
    }

    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {
    include_once WOO_ST_PATH . 'templates/admin/' . $template;
    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php
    }
    }

    function woo_st_order_items_data_meta_box( $post_or_order_object ) {
    if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
    $template = 'order_item_data_hpos.php';
    if ( !file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {
    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    }
    else {
    $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
    foreach (['line_item','tax','shipping','fee','coupon'] as $type) {
    $order_items = $order->get_items($type);
    include WOO_ST_PATH . 'templates/admin/' . $template;
    }
    }
    } else {
    global $wpdb;
    $post = $post_or_order_object instanceof WP_Post ? $post_or_order_object : false;
    $post_id = absint( $post->ID ? $post->ID : false );

    $order_items_sql = $wpdb->prepare( 'SELECT
    order_item_id as id, order_item_name as name, order_item_type as type FROM ' . $wpdb->prefix . 'woocommerce_order_items WHERE order_id = %d', $post_id );
    if ( $order_items = $wpdb->get_results( $order_items_sql ) ) {
    foreach ( $order_items as $key => $order_item ) {
    $order_itemmeta_sql = $wpdb->prepare( 'SELECT meta_key, meta_value FROM ' . $wpdb->prefix . 'woocommerce_order_itemmeta AS order_itemmeta WHERE order_item_id = %d ORDER BY order_itemmeta.meta_key ASC', $order_item->id );
    $order_items[ $key ]->meta = $wpdb->get_results( $order_itemmeta_sql );
    }
    }

    $type = 'order_item';
    $template = 'order_item_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {
    include_once WOO_ST_PATH . 'templates/admin/' . $template;
    } else {
    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    }
    }
    if (!empty($message)) {
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php
    }
    }

    function woo_st_order_refunds_data_meta_box( $post_or_order_object ) {
    if ( OrderUtil::custom_orders_table_usage_is_enabled() ) {
    $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
    $order_refunds = $order->get_refunds();

    $type = 'refund';
    $template = 'order_refund_data_hpos.php';
    } else {
    $post = $post_or_order_object instanceof WP_Post ? $post_or_order_object : false;
    $post_id = absint( $post->ID ? $post->ID : false );

    $refunds = woo_st_get_order_refunds( $post_id );

    $type = 'refund';
    $template = 'order_refund_data.php';
    }
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {
    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_order_related_orders_meta_box( $post_or_order_object ) {

    $orders = array();
    $order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;
    $user_id = $order->get_customer_id();
    $matching = false;

    if ( ! empty( $user_id ) ) {
    $matching = 'user_id';
    // Check if a User has been linked to this Order.
    $args = array(
    'return' => 'ids',
    );
    $orders = woo_st_get_user_orders( $user_id, $args );
    } else {
    $matching = 'billing_email';
    // Fallback to the Billing e-mail address
    $billing_email = get_post_meta( $post_id, '_billing_email', true );
    if ( ! empty( $billing_email ) ) {
    $post_type = 'shop_order';
    $args = array(
    'post_type' => $post_type,
    'fields' => 'ids',
    );

    $args['post_status'] = ( function_exists( 'wc_get_order_statuses' ) ? apply_filters( 'woo_st_order_post_status', array_keys( wc_get_order_statuses() ) ) : 'any' );
    $args['meta_query'][] = array(
    'key' => '_billing_email',
    'value' => $billing_email,
    );
    $order_ids = new WP_Query( $args );
    $orders = ( ! empty( $order_ids->posts ) ? $order_ids->posts : false );
    }
    }

    // Remove this Order from the list.
    if ( ! empty( $orders ) ) {
    $needle = array_search( $order->get_id(), $orders );
    if ( false !== $needle ) {
    unset( $orders[ $needle ] );
    }
    }

    $type = 'order';
    $template = 'order_related_orders.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {
    include_once WOO_ST_PATH . 'templates/admin/' . $template;
    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php
    }
    }

    function woo_st_coupon_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'coupon';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_export_template_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'export_template';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_category_data_meta_box( $term = '', $taxonomy = '' ) {

    $term_taxonomy = 'product_cat';
    $term_meta = get_term_meta( $term->term_id );

    // We support up to 5 levels deep; can be extended further as needed

    // Term
    $category_heirachy = $term->name;
    $category_depth = 1;
    if ( ! empty( $term->parent ) ) {
    // Term > Term
    $parent = get_term( $term->parent );
    if ( ! is_wp_error( $parent ) ) {
    ++$category_depth;
    $category_heirachy = $parent->name . ' &raquo; ' . $category_heirachy;
    // Term > Term > Term
    $parent = get_term( $parent->parent );
    if ( ! is_wp_error( $parent ) ) {
    ++$category_depth;
    $category_heirachy = $parent->name . ' &raquo; ' . $category_heirachy;
    // Term > Term > Term > Term
    $parent = get_term( $parent->parent );
    if ( ! is_wp_error( $parent ) ) {
    ++$category_depth;
    $category_heirachy = $parent->name . ' &raquo; ' . $category_heirachy;
    // Term > Term > Term > Term > Term
    $parent = get_term( $parent->parent );
    if ( ! is_wp_error( $parent ) ) {
    $category_heirachy = $parent->name . ' &raquo; ' . $category_heirachy;
    }
    }
    }
    }
    }

    $type = 'category';
    $class = 'category_data';

    $template = 'term_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }

    $template = 'category_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_tag_data_meta_box( $term = '', $taxonomy = '' ) {

    $term_taxonomy = 'product_tag';
    $term_meta = get_term_meta( $term->term_id );

    $type = 'tag';
    $class = 'tag_data';
    $template = 'term_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_brand_data_meta_box( $term = '', $taxonomy = '' ) {

    $term_taxonomy = 'product_brand';
    $term_meta = get_term_meta( $term->term_id );

    $type = 'brand';
    $class = 'brand_data';
    $template = 'term_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_product_vendor_data_meta_box( $term = '', $taxonomy = '' ) {

    $term_taxonomy = 'yith_shop_vendor';
    $term_meta = get_term_meta( $term->term_id );

    $type = 'product_vendor';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_user_orders( $user ) {

    if ( ! current_user_can( 'manage_woocommerce' ) ) {
    return;
    }

    $user_id = $user->data->ID;
    $posts_per_page = apply_filters( 'woo_st_user_orders_posts_per_page', 10 );
    $args = array(
    'numberposts' => $posts_per_page,
    );
    $total_orders = woo_st_get_user_orders( $user_id, $args, 'found_posts' );
    $paged = ( isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1 );
    if ( ! empty( $paged ) ) {
    $args['paged'] = $paged;
    }
    $max_page = absint( $total_orders / $posts_per_page );
    $orders = ( ! empty( $total_orders ) ? woo_st_get_user_orders( $user_id, $args ) : false );

    $type = 'user';
    $template = 'user_orders.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }


    function woo_st_user_data_meta_box( $user = '' ) {

    $user_id = $user->data->ID;
    $user_meta = get_user_meta( $user_id );

    $template = 'user_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_scheduled_export_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'scheduled_export';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_event_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'event';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_booking_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'booking';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_user_membership_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'user_membership';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_generic_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'post';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_membership_plan_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'membership_plan';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    function woo_st_attachment_data_meta_box() {

    global $post;

    $post_id = absint( $post->ID ? $post->ID : false );

    $post_meta = get_post_custom( $post_id );

    $type = 'attachment';
    $template = 'post_data.php';
    if ( file_exists( WOO_ST_PATH . 'templates/admin/' . $template ) ) {

    include_once WOO_ST_PATH . 'templates/admin/' . $template;

    } else {

    $message = sprintf( __( 'We couldn\'t load the template file <code>%1$s</code> within <code>%2$s</code>, this file should be present.', 'woocommerce-store-toolkit' ), $template, WOO_ST_PATH . 'includes/admin/...' );
    ?>
    <p><strong><?php echo wp_kses_data( $message ); ?></strong></p>
    <p><?php _e( 'You can see this error for one of a few common reasons', 'woocommerce-store-toolkit' ); ?>:</p>
    <ul class="ul-disc">
    <li><?php _e( 'WordPress was unable to create this file when the Plugin was installed or updated', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin files have been recently changed and there has been a file conflict', 'woocommerce-store-toolkit' ); ?></li>
    <li><?php _e( 'The Plugin file has been locked and cannot be opened by WordPress', 'woocommerce-store-toolkit' ); ?></li>
    </ul>
    <p><?php _e( 'Jump onto our website and download a fresh copy of this Plugin as it might be enough to fix this issue. If this persists get in touch with us.', 'woocommerce-store-toolkit' ); ?></p>
    <?php

    }
    }

    order_item_data_hpos.php

    <?php
    // Exit if accessed directly.
    if ( ! defined( 'ABSPATH' ) ) {
    exit;
    }
    if ( ! empty( $order_items ) ) : ?>
    <table class="widefat striped" style="font-family:monospace; text-align:left; width:100%;">
    <tbody>
    <p> <?= "Type: " . $type ?> </p>
    <?php
    foreach ( $order_items as $order_item ) :
    $data = $order_item->get_data();
    foreach ( $data as $key => $value ) :
    if ( 'meta_data' === $key ) :
    foreach ( $value as $meta ) :
    ?>
    <tr>
    <th style="width:20%;"><?php echo 'meta_data[' . esc_html( $meta->get_data()['key'] ) . ']'; ?></th>
    <td>
    <?php
    $value = $meta->get_data()['value'];
    switch ( $value ) {
    case is_array( $value ):
    echo '<pre>' . esc_html( print_r( $value, true ) ) . '</pre>';
    break;
    case is_object( $value ):
    echo '<pre>' . esc_html( print_r( $value, true ) ) . '</pre>';
    break;
    default:
    echo esc_html( $value );
    break;
    }
    ?>
    </td>
    </tr>
    <?php
    endforeach;
    else :
    ?>
    <tr>
    <th style="width:20%;"><?php echo esc_html( $key ); ?></th>
    <td>
    <?php
    switch ( $value ) {
    case is_array( $value ):
    echo '<pre>' . esc_html( print_r( $value, true ) ) . '</pre>';
    break;
    case is_object( $value ):
    echo '<pre>' . esc_html( print_r( $value, true ) ) . '</pre>';
    break;
    default:
    echo esc_html( $value );
    break;
    }
    ?>
    </td>
    </tr>
    <?php
    endif;
    endforeach;
    endforeach;
    ?>
    </tbody>
    </table>
    <?php else : ?>
    <p><?= "No order item data is associated with type: " . $type ?></p>
    <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.