WordPress at Your Fingertips
function is not described

WC_Order_Item_Product::get_product() public WC 1.0

Get the associated product.

{} It's a method of the class: WC_Order_Item_Product{}

Return

WC_Product|true|false.

Usage

$WC_Order_Item_Product = new WC_Order_Item_Product();
$WC_Order_Item_Product->get_product();

Code of WC_Order_Item_Product::get_product() WC 5.7.0

public function get_product() {
	if ( $this->get_variation_id() ) {
		$product = wc_get_product( $this->get_variation_id() );
	} else {
		$product = wc_get_product( $this->get_product_id() );
	}

	// 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 );
}