update_woo_com_subscription_details хук-фильтрWC 8.7.0

Filters the Woo plugin data before saving it in transient used for updates.

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

add_filter( 'update_woo_com_subscription_details', 'wp_kama_update_woo_com_subscription_details_filter', 10, 3 );

/**
 * Function for `update_woo_com_subscription_details` filter-hook.
 * 
 * @param array $item       Plugin item to modify.
 * @param array $data       Subscription data fetched from Helper API for the plugin.
 * @param int   $product_id Woo product id assigned to the plugin.
 *
 * @return array
 */
function wp_kama_update_woo_com_subscription_details_filter( $item, $data, $product_id ){

	// filter...
	return $item;
}
$item(массив)
Plugin item to modify.
$data(массив)
Subscription data fetched from Helper API for the plugin.
$product_id(int)
Woo product id assigned to the plugin.

Список изменений

С версии 8.7.0 Введена.

Где вызывается хук

WC_Helper_Updater::transient_update_plugins()
update_woo_com_subscription_details
WC_Helper_Updater::transient_update_themes()
update_woo_com_subscription_details
woocommerce/includes/admin/helper/class-wc-helper-updater.php 105
$item = apply_filters( 'update_woo_com_subscription_details', $item, $data, $plugin['_product_id'] );
woocommerce/includes/admin/helper/class-wc-helper-updater.php 165
$item = apply_filters( 'update_woo_com_subscription_details', $item, $data, $theme['_product_id'] );

Где используется хук в WooCommerce

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