woocommerce_order_item_needs_processing

The WooCommerce woocommerce order item needs processing hook.

Description

apply_filters( 'woocommerce_order_item_needs_processing', (unknown) $virtual_downloadable_item, (unknown) $product, (unknown) $this_get_id ); 

Parameters (3)

0. $virtual_downloadable_item (unknown) => ! $virtual_downloadable_item
The virtual downloadable item.
1. $product (unknown)
The product.
2. $this_get_id (unknown)
The this get id.

Usage

To run the hook, copy the example below.
  1. $virtual_downloadable_item = apply_filters( 'woocommerce_order_item_needs_processing', $virtual_downloadable_item, $product, $this_get_id ); 
  2.  
  3. if ( !empty( $virtual_downloadable_item ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_order_item_needs_processing callback 
  2. function filter_woocommerce_order_item_needs_processing( $virtual_downloadable_item, $product, $this_get_id ) { 
  3. // make filter magic happen here... 
  4. return $virtual_downloadable_item
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_order_item_needs_processing', 'filter_woocommerce_order_item_needs_processing', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_order_item_needs_processing', 'filter_woocommerce_order_item_needs_processing', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/class-wc-order.php  
  1. if ( apply_filters( 'woocommerce_order_item_needs_processing', ! $virtual_downloadable_item, $product, $this->get_id() ) ) {