Add Below Code in Your Theme function.php
function action_woocommerce_admin_order_item_headers( )
{ ?>
<th class="item sortable" colspan="2" data-sort="string-ins"><?php _e( 'Item category', 'woocommerce' ); ?></th>
<?php
};
// define the woocommerce_admin_order_item_values callback
function action_woocommerce_admin_order_item_values( $_product, $item, $item_id )
{ ?>
<td class="name" colspan="2" >
<?php
$termsp = get_the_terms( $_product->id, 'product_cat' );
if(!empty($termsp)){
foreach ($termsp as $term) {
$_categoryid = $term->term_id;
if( $term = get_term_by( 'id', $_categoryid, 'product_cat' ) ){
echo $term->name .', ';
}
} } ?>
</td>
<?php
};
// add the action
add_action( 'woocommerce_admin_order_item_values', 'action_woocommerce_admin_order_item_values', 10, 3 );
add_action( 'woocommerce_admin_order_item_headers', 'action_woocommerce_admin_order_item_headers', 10, 0 );
Related Posts:
- How to redefine the sorting of product categories by menu_order?
- WooCommerce – How to show specific category first-rest of products-specific category last
- How do order product categories – on a parent category page – in Woocommerce?
- Woocommerce custom taxonomy order
- Change woo status automatically [closed]
- Display All Products by Category with WooCommerce
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- Woocommerce get category image full size
- Order get_terms() By Custom Field
- How to Change the Categories Order in the Admin Dashboard?
- Sort posts by tags in category pages
- Programmatically create product category and add thumbnail in woocommerce
- Display all posts in category, with specific tag posts at top
- Reflect nested categories in appearance > menus
- Create product category and keyword search form in woocommerce? [closed]
- I want to order categories based upon the latest post time
- Remove child products from woocommerce category page [closed]
- WordPress Ordering Problem. How to fix ordering 1-10-100 issue?
- How do I edit pre_get_post for the category the user is currently in?
- Order posts by category name
- Display WooCommerce product categories in a 4 columns custom menu [closed]
- How to select product category while adding new product in woocommerce? [closed]
- Use get_term_children to get the sub category of a parent category for the current post
- Hide uncategorized products from the shop page
- Remove word “Category” from WooCommerce product page [closed]
- Filtering search results
- WooCommerce change category url and product base
- Output link to category from WP_Query loop of woocommerce products
- display woocommerce all category title on home page
- Add Icons to the Product Category Sidebar Widget WooCommerce
- Add Product categories to WordPress menu without losing hierarchy
- Display “add to cart” button on every listing in product category page?
- How to get product count with respect to categories in WooComerce
- Custom page for WooCommerce’s /product-category/
- Getting categories id for all products in cart
- Get woocommerce catogry
- get_cat_ID() not wokring
- Display child categories in WooCommerce
- WooCommerce duplicate sub categories and product slugs
- Custom order categories in admin dashboard
- Arrange posts by date in front page
- Set post categories to include parents when setting child category
- WooCommerce IF statements not working
- Linking products to categories
- Woocommerce category show subcategories only/omit posts for specific category
- Warning: sizeof (): Parameter must be an array or an object that implements Countable, On products pages
- Omit specific product categories from WooCommerce shortcode
- products nested by subcategories in a current category archive
- WC 3.x Get categories from variable product of the cart
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Product Category WooCommerce
- Hide woocommerce category name from specific pages
- Hide woocommerce category name from specific pages
- need to add custom field in more products
- Pagination not visible on woocommerce’s category page
- Pagination is not working properly in Product Category/Tag pages
- Best way of getting WooCommerce category path
- How to recreate a copy of a product category in WooCommerce? [closed]
- Get parrent category name
- Sorting category products not working
- Remove product category placeholder image (Woocomerce)
- Categories for each brands
- Order categories by name or view count
- Change thumbnail image depending product category
- Unwanted Duplicate Product Categories in WooCommerce
- Woocommerce custom category pages
- Customize WordPress widget – Product Category
- WordPress/Woocommerce only show category in shop to a single role
- Woocommerce custom category page with pagination [closed]
- Custom taxonomy/category order
- I want to display the all the posts that are inside a certain subcategory
- wp e-commerce group product by category [closed]
- List posts in alphabetical order
- Categories are not listing their respective products
- Display single category name in woocommerce loop
- Building Menu from Woocommerce Product Categories
- Include WooCommerce product to all child categories
- woocommerce related products by specific categories [closed]
- Custom loop of a single category, cannot order by date. What am I missing?
- How to change the order of the subcategory and category in a post?
- Do not show sub categories in the loop on archive-product.php
- List just subcategory and products of active category page in Woocommerce
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Display all product tags associated with a specific product category
- why get_the_post_thumbnail( the_ID()) echos extra post id
- How to access deleted term inside delete_product_cat action
- Apply WordPress function on specific woocommerce product categories only
- Filter WooCommerce archive pages by an additional category
- Grandchild Term Things Grandfather Term is It’s Parent
- Custom tax_query filter not working for Woocommerce product categories
- Woocommerce filter function not updating
- Adding custom ID field to the categories
- How can i change what one category displays?
- Remove any product that is featured from regular display loop [WooCommerce]
- Two Sections on Woocommerce Catergory Page [closed]
- Woocommerce search form with category select
- How to display product with two condition, category and brand taxonomy
- Show different menu on each woocommerce category page
- Template for product-category page [closed]
- Natural sort / ordering wp_dropdown_categories
- Sort posts alphabetically by category/custom taxonomy, insert divider between different types