You will use the following to replace displayed key label _articleid
with for example 'Article ID' in order items on WooCommerce admin single orders:
add_filter('woocommerce_order_item_display_meta_key', 'filter_wc_order_item_display_meta_key', 20, 3 );
function filter_wc_order_item_display_meta_key( $display_key, $meta, $item ) {
// Change displayed label for specific order item meta key
if( is_admin() && $item->get_type() === 'line_item' && $meta->key === '_articleid' ) {
$display_key = __("Article ID", "woocommerce" );
}
return $display_key;
}
Code goes in functions.php file of the active child theme (or active theme). It should works.
Related:
Change order item custom meta data displayed label and value in WooCommerce Admin orders
Related to this thread:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…