Skip to content
Hippoo WooCommerce app Hippoo WooCommerce app
Hippoo WooCommerce app
  • Help center
  • Feature request
  • For Agencies
  • Blog
  • Contact us
Download now

Getting Started

4
  • Install Hippoo WooCommerce plugin
  • Automatic Connection to Hippoo App
  • Manual Connection to Hippoo App
  • Adding Multiple Shops in Hippoo

User Guide

9
  • How to Clean Up Long Metadata Under Order Items (Keep Only Size/Color)
  • How to Customize Invoice and Shipping Label Templates in Hippoo
  • How to Use Hippoo Extensions
  • Printing Invoices and Shipping Labels in Hippoo
  • Using the Hippoo Order Weight Calculator
  • Using the Barcode Scanner in Hippoo
  • How to Use Status Updater in Hippoo
  • Pin Custom Field in Order Summary
  • Setting Up Custom Event Notifications in Hippoo

Troubleshoot

6
  • Order Status Not Updating in the Hippoo Mobile App (WooCommerce REST API & Caching)
  • Cannot Add Product in Hippoo App
  • Cannot Upload Photo in Media Library via Hippoo app
  • WooCommerce Sales Reports Showing Zero in Hippoo app
  • Order Notifications Not Receiving in Hippoo App
  • Plugin Installed but App Shows Plugin Not Installed
View Categories
  • Home
  • Docs
  • User Guide
  • How to Clean Up Long Metadata Under Order Items (Keep Only Size/Color)

How to Clean Up Long Metadata Under Order Items (Keep Only Size/Color)

1 min read

Since Hippoo Android v2.8.0 (November 2025), we started showing all product/item metadata directly under each line item in the order view. a feature requested by many stores using add-ons, custom fields, gift messages, etc.

We understand that for most users this creates very long paragraphs and that you usually only need to see the variation details (Size, Color, etc.).

Here are the two most common solutions:

Option 1 – Keep only Size, Color, etc. (recommended for most stores) #

Add this snippet to your child theme’s functions.php or via the free Code Snippets plugin:

// Hippoo: Show only variation attributes (Size, Color, etc.) in orders
add_filter('woocommerce_rest_prepare_shop_order_object', function($response, $order, $request){
    $data = $response->get_data();

    if (!empty($data['line_items'])) {
        foreach ($data['line_items'] as $index => $item) {
            if (empty($item['meta_data'])) continue;

            $product = wc_get_product($item['product_id']);

            // Simple products → hide all meta
            if (!$product || !$product->is_type('variable')) {
                $data['line_items'][$index]['meta_data'] = [];
                continue;
            }

            // Keep only real variation attributes
            $allowed = array_keys($product->get_attributes());
            $new_meta = array_filter($item['meta_data'], function($meta) use ($allowed) {
                return in_array($meta['key'], $allowed, true);
            });

            $data['line_items'][$index]['meta_data'] = array_values($new_meta);
        }
    }

    $response->set_data($data);
    return $response;
}, PHP_INT_MAX, 3);

Result: only Size, Color, etc. appear under each item, everything else disappears.

Option 2 – Hide all metadata completely (old clean look) #

add_filter('woocommerce_rest_prepare_shop_order_object', function($r){
    foreach($r->data['line_items'] ?? [] as $k => $i) 
        $r->data['line_items'][$k]['meta_data'] = [];
    return $r;
}, PHP_INT_MAX);

Both snippets only affect the data Hippoo receives, your website, checkout, and customer emails stay exactly the same.

Updated on December 7, 2025

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Table of Contents
  • Option 1 – Keep only Size, Color, etc. (recommended for most stores)
  • Option 2 – Hide all metadata completely (old clean look)

Copyright © 2025 Hippoo. All rights reserved.

Download the Hippoo app

To install the app, choose your preferred operating system: Android or iOS. Then, download the app from Google Play or the Apple Store. Additionally, remember to install the Hippoo WooCommerce plugin to connect the app to your WooCommerce shop.

 

.