WC_Helper_Updater::get_update_data()
Get update data for all extensions.
Description Description
Scans through all subscriptions for the connected user, as well as all Woo extensions without a subscription, and obtains update data for each product.
Return Return
(array) Update data {product_id => data}
Source Source
File: includes/admin/helper/class-wc-helper-updater.php
public static function get_update_data() { $payload = array(); // Scan subscriptions. foreach ( WC_Helper::get_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']; } // Scan local themes. foreach ( WC_Helper::get_local_woo_themes() 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 ); }