WC_Abstract_Legacy_Product::get_child()publicWC 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.

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.

WC_Abstract_Legacy_Product::get_child() code WC 8.7.0

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