woocommerce_get_product_from_item
Usage
add_filter( 'woocommerce_get_product_from_item', 'wp_kama_woocommerce_get_product_from_item_filter', 10, 3 ); /** * Function for `woocommerce_get_product_from_item` filter-hook. * * @param $product * @param $that * @param $order * * @return */ function wp_kama_woocommerce_get_product_from_item_filter( $product, $that, $order ){ // filter... return $product; }
- $product
- -
- $that
- -
- $order
- -
Where the hook is called
woocommerce_get_product_from_item
woocommerce_get_product_from_item
woocommerce/includes/class-wc-order-item-product.php 355
$product = apply_filters( 'woocommerce_get_product_from_item', $product, $this, $this->get_order() );
woocommerce/includes/legacy/abstract-wc-legacy-order.php 326
return apply_filters( 'woocommerce_get_product_from_item', $product, $item, $this );