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

WC_Helper::_get_subscriptions_from_product_id() private WC 1.0

Get a subscription entry from product_id. If multiple subscriptions are found with the same product id and $single is set to true, will return the first one in the list, so you can use this method to get things like extension name, version, etc.

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

Хуков нет.

Возвращает

Массив/true/false. The array containing sub data or false.

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

$result = WC_Helper::_get_subscriptions_from_product_id( $product_id, $single );
$product_id(число) (обязательный)
The product id.
$single(true/false)
Whether to return a single subscription or all matching a product id.
По умолчанию: true

Код WC_Helper::_get_subscriptions_from_product_id() WC 4.5.2

woocommerce/includes/admin/helper/class-wc-helper.php
<?php
private static function _get_subscriptions_from_product_id( $product_id, $single = true ) {
	$subscriptions = wp_list_filter( self::get_subscriptions(), array( 'product_id' => $product_id ) );
	if ( ! empty( $subscriptions ) ) {
		return $single ? array_shift( $subscriptions ) : $subscriptions;
	}

	return false;
}