WordPress at Your Fingertips
function is not described

WC_Product::set_cross_sell_ids() public WC 3.0.0

Set crosssell IDs.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Product = new WC_Product();
$WC_Product->set_cross_sell_ids( $cross_sell_ids );
$cross_sell_ids(array) (required)
IDs from the cross-sell products.

Changelog

Since 3.0.0 Introduced.

Code of WC_Product::set_cross_sell_ids() WC 5.5.2

<?php
public function set_cross_sell_ids( $cross_sell_ids ) {
	$this->set_prop( 'cross_sell_ids', array_filter( (array) $cross_sell_ids ) );
}