woocommerce_get_item_data filter-hookWC 1.0

Filter item data to allow 3rd parties to add more to the array.

Usage

add_filter( 'woocommerce_get_item_data', 'wp_kama_woocommerce_get_item_data_filter', 10, 2 );

/**
 * Function for `woocommerce_get_item_data` filter-hook.
 * 
 * @param  $item_data 
 * @param  $cart_item 
 *
 * @return 
 */
function wp_kama_woocommerce_get_item_data_filter( $item_data, $cart_item ){

	// filter...
	return $item_data;
}
$item_data
-
$cart_item
-

Where the hook is called

wc_get_formatted_cart_item_data()
woocommerce_get_item_data
CartItemSchema::get_item_data()
woocommerce_get_item_data
woocommerce/includes/wc-template-functions.php 3734
$item_data = apply_filters( 'woocommerce_get_item_data', $item_data, $cart_item );
woocommerce/packages/woocommerce-blocks/src/StoreApi/Schemas/V1/CartItemSchema.php 461
$item_data = apply_filters( 'woocommerce_get_item_data', array(), $cart_item );

Where the hook is used in WooCommerce

Usage not found.