WordPress at Your Fingertips
function is not described

WC_Abstract_Legacy_Product::get_child() public WC 1.0

Deprecated from version 3.0.0. It is no longer supported and can be removed in future releases. Use wc_get_product instead.

Returns the child product.

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

No Hooks.

Return

WC_Product|WC_Product|WC_Product_variation.

Usage

$WC_Abstract_Legacy_Product = new WC_Abstract_Legacy_Product();
$WC_Abstract_Legacy_Product->get_child( $child_id );
$child_id(mixed) (required)
-

Changelog

Deprecated Since 3.0.0 Use wc_get_product instead.

Code of WC_Abstract_Legacy_Product::get_child() WC 5.5.2

<?php
public function get_child( $child_id ) {
	wc_deprecated_function( 'WC_Product::get_child', '3.0', 'wc_get_product' );
	return wc_get_product( $child_id );
}