WordPress at a glance
function is not described

wc_update_360_downloadable_product_permissions_index() WC 1.0

Add new user_order_remaining_expires to speed up user download permission fetching.

No Hooks.

Return

null.

Usage

wc_update_360_downloadable_product_permissions_index();

Code of wc_update_360_downloadable_product_permissions_index() WC 5.0.0

<?php
function wc_update_360_downloadable_product_permissions_index() {
	global $wpdb;

	$index_exists = $wpdb->get_row( "SHOW INDEX FROM {$wpdb->prefix}woocommerce_downloadable_product_permissions WHERE key_name = 'user_order_remaining_expires'" );

	if ( is_null( $index_exists ) ) {
		$wpdb->query( "ALTER TABLE {$wpdb->prefix}woocommerce_downloadable_product_permissions ADD INDEX user_order_remaining_expires (user_id,order_id,downloads_remaining,access_expires)" );
	}
}