WordPress at a glance
function is not described

wc_update_product_stock_status() WC 1.0

Update a product's stock status.

No Hooks.

Return

Null. Nothing.

Usage

wc_update_product_stock_status( $product_id, $status );
$product_id(int) (required)
Product ID.
$status(int) (required)
Status.

Code of wc update product stock status: woocommerce/includes/wc-stock-functions.php WC 3.7.0

<?php
function wc_update_product_stock_status( $product_id, $status ) {
	$product = wc_get_product( $product_id );
	if ( $product ) {
		$product->set_stock_status( $status );
		$product->save();
	}
}