woocommerce_get_product_from_item

woocommerce_get_product_from_item

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_get_product_from_item') is found 2 times:

  • /includes/class-wc-order-item-product.php line 355
    		}
    
    		// Backwards compatible filter from WC_Order::get_product_from_item().
    		if ( has_filter( 'woocommerce_get_product_from_item' ) ) {
    			$product = apply_filters( 'woocommerce_get_product_from_item', $product, $this, $this->get_order() );
    		}
    
    		return apply_filters( 'woocommerce_order_item_product', $product, $this );
    	}
    
    	/**
    
  • /includes/legacy/abstract-wc-legacy-order.php line 326
    			$product = $item->get_product();
    		} else {
    			$product = false;
    		}
    		return apply_filters( 'woocommerce_get_product_from_item', $product, $item, $this );
    	}
    
    	/**
    	 * Set the customer address.
    	 * @param array $address Address data.
    	 * @param string $type Type of address; 'billing' or 'shipping'.