WC_Abstract_Legacy_Product::get_related_termsprotectedWC 1.0

Deprecated since 3.0.0. It is no longer supported and may be removed in future releases. Use wc_get_product_term_ids instead.

Retrieves related product terms.

Method of the class: WC_Abstract_Legacy_Product{}

No Hooks.

Returns

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_related_terms( $term );
$term(required)
.

Changelog

Deprecated since 3.0.0 Use wc_get_product_term_ids instead.

WC_Abstract_Legacy_Product::get_related_terms() code WC 9.9.3

protected function get_related_terms( $term ) {
	wc_deprecated_function( 'WC_Product::get_related_terms', '3.0', 'wc_get_product_term_ids' );
	return array_merge( array( 0 ), wc_get_product_term_ids( $this->get_id(), $term ) );
}