WordPress at a glance
function is not described

WC_Product_Data_Store_Interface::get_related_products() public WC 1.0

Return a list of related products (using data like categories and IDs).

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

No Hooks.

Return

Array.

Usage

$WC_Product_Data_Store_Interface = new WC_Product_Data_Store_Interface();
$WC_Product_Data_Store_Interface->get_related_products( $cats_array, $tags_array, $exclude_ids, $limit, $product_id );
$cats_array(array) (required)
List of categories IDs.
$tags_array(array) (required)
List of tags IDs.
$exclude_ids(array) (required)
Excluded IDs.
$limit(int) (required)
Limit of results.
$product_id(int) (required)
Product ID.

Code of WC_Product_Data_Store_Interface::get_related_products() WC 5.0.0

<?php
public function get_related_products( $cats_array, $tags_array, $exclude_ids, $limit, $product_id );