WordPress at Your Fingertips
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.




$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.8.0

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