WC_Helper_Updater::get_available_extensions_downloads_data
Get update data for all plugins.
Метод класса: WC_Helper_Updater{}
Хуков нет.
Возвращает
Массив. Update data {product_id => data}
Использование
$result = WC_Helper_Updater::get_available_extensions_downloads_data();
Заметки
- Смотрите: get_update_data
Код WC_Helper_Updater::get_available_extensions_downloads_data() WC Helper Updater::get available extensions downloads data WC 10.4.0
public static function get_available_extensions_downloads_data() {
$payload = array();
// Scan subscriptions.
$subscriptions = WC_Helper::get_subscriptions();
foreach ( $subscriptions as $subscription ) {
$payload[ $subscription['product_id'] ] = array(
'product_id' => $subscription['product_id'],
'file_id' => '',
);
}
// Scan local plugins which may or may not have a subscription.
foreach ( WC_Helper::get_local_woo_plugins() as $data ) {
if ( ! isset( $payload[ $data['_product_id'] ] ) ) {
$payload[ $data['_product_id'] ] = array(
'product_id' => $data['_product_id'],
);
}
$payload[ $data['_product_id'] ]['file_id'] = $data['_file_id'];
}
return self::_update_check( $payload );
}