WC_Product_Data_Store_Interface::get_related_products()
Return a list of related products (using data like categories and IDs).
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.
WC_Product_Data_Store_Interface::get_related_products() WC Product Data Store Interface::get related products code WC 9.3.3
public function get_related_products( $cats_array, $tags_array, $exclude_ids, $limit, $product_id );