woocommerce_order_item_needs_processing filter-hookWC 2.7.0

Filters whether an order line item requires processing. By default, only virtual downloadable items do not require processing; all other items do.

Usage

add_filter( 'woocommerce_order_item_needs_processing', 'wp_kama_woocommerce_order_item_needs_processing_filter', 10, 3 );

/**
 * Function for `woocommerce_order_item_needs_processing` filter-hook.
 * 
 * @param bool        $needs_processing 
 * @param \WC_Product $product          
 * @param int         $order_id         
 *
 * @return bool
 */
function wp_kama_woocommerce_order_item_needs_processing_filter( $needs_processing, $product, $order_id ){

	// filter...
	return $needs_processing;
}
$needs_processing(true|false)
-
$product(\WC_Product)
-
$order_id(int)
-

Changelog

Since 2.7.0 Introduced.

Where the hook is called

WC_Order::needs_processing()
woocommerce_order_item_needs_processing
woocommerce/includes/class-wc-order.php 1895
$custom_needs_processing = (bool) apply_filters( 'woocommerce_order_item_needs_processing', ! $virtual_downloadable_item, $product, $order_id );

Where the hook is used in WooCommerce

Usage not found.