WordPress filter hook

woocommerce_admin_order_item_types

Defined by WooCommerce and fired by 17 plugins in total, running on 7M+ sites between them.

How to use woocommerce_admin_order_item_types

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_admin_order_item_types', function( $value ) {
	// Change $value here.
	return $value;
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

17 plugins that fire woocommerce_admin_order_item_types

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) includes/admin/meta-boxes/views/html-order-items.php:27
  2. Dokan: AI Powered WooCommerce Multivendor Marketplace Solution icon Dokan: AI Powered WooCommerce Multivendor Marketplace Solution30,000+ installs apply_filters( 'woocommerce_admin_order_item_types', array( 'line_item', 'fee' ) ) templates/orders/details.php:41
  3. WCFM Membership icon WCFM Membership10,000+ installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) core/class-wcfmvm-frontend.php:805
  4. Return Refund and Exchange For WooCommerce icon Return Refund and Exchange For WooCommerce4,000+ installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) admin/partials/woo-refund-and-exchange-lite-return-meta.php:31
  5. Colete-Online icon Colete-Online600+ installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) includes/ColeteOnlineWcOrderDataHelper.php:67
  6. Dokan Access Manager icon Dokan Access Manager30+ installs apply_filters( 'woocommerce_admin_order_item_types', array( 'line_item', 'fee' ) ) dokan-templates/orders/details.php:52
  7. StoreSuite icon StoreSuite20+ installs apply_filters( 'woocommerce_admin_order_item_types', array( 'line_item' ) ) templates/orders/order-details.php:103
  8. Convead icon Convead20+ installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) includes/convead.class.php:349
  9. Manual Credit Card Processing for WooCommerce icon Manual Credit Card Processing for WooCommerce10+ installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) templates/html-order-manual-payment.php:34
  10. Account Manager for WooCommerce icon Account Manager for WooCommerce10+ installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) template/commission/order-edit.php:388
  11. SS Feefo Integration icon SS Feefo Integration10+ installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) feefo-sales.php:49
  12. Messaging Alerts Integration for WooCommerce icon Messaging Alerts Integration for WooCommerce10+ installs apply_filters( 'woocommerce_admin_order_item_types', array("line_item") ) core/wabaapi.class.php:68
  13. Invoice management for Woocommerce icon Invoice management for WoocommerceFewer than 10 installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) admin/meta-boxes/views/html-order-items.php:13
  14. Goopter advanced integration for PayPal Complete Payments and for WooCommerce icon Goopter advanced integration for PayPal Complete Payments and for WooCommerceFewer than 10 installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) ppcp-gateway/class-goopter-paypal-ppcp-payment.php:2025
  15. Markeaze for WooCommerce icon Markeaze for WooCommerceFewer than 10 installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) includes/Markeaze.class.php:331
  16. GooTracking for WooCommerce icon GooTracking for WooCommerceFewer than 10 installs apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) templates/form/getHtmlPdf.php:79
  17. SMSConnectWoo Unify SMS Gateway Center icon SMSConnectWoo Unify SMS Gateway CenterFewer than 10 installs apply_filters( 'woocommerce_admin_order_item_types', array("line_item") ) core/unifysgcsms.class.php:68

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.