WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Admin_Post_Types::maybe_update_stock_status() private WC 1.0

Apply product type constraints to stock status.

Это метод класса: WC_Admin_Post_Types{}

Хуков нет.

Возвращает

WC_Product. The supplied product, or the synced product if it was a variable product.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->maybe_update_stock_status( $product, $stock_status );
$product(WC_Product) (обязательный)
The product whose stock status will be adjusted.
$stock_status(строка/null) (обязательный)
The stock status to use for adjustment, or null if no new stock status has been supplied in the request.

Код WC_Admin_Post_Types::maybe_update_stock_status() WC 4.5.2

woocommerce/includes/admin/class-wc-admin-post-types.php
<?php
private function maybe_update_stock_status( $product, $stock_status ) {
	if ( $product->is_type( 'external' ) ) {
		// External products are always in stock.
		$product->set_stock_status( 'instock' );
	} elseif ( isset( $stock_status ) ) {
		if ( $product->is_type( 'variable' ) && ! $product->get_manage_stock() ) {
			// Stock status is determined by children.
			foreach ( $product->get_children() as $child_id ) {
				$child = wc_get_product( $child_id );
				if ( ! $product->get_manage_stock() ) {
					$child->set_stock_status( $stock_status );
					$child->save();
				}
			}
			$product = WC_Product_Variable::sync( $product, false );
		} else {
			$product->set_stock_status( $stock_status );
		}
	}

	return $product;
}