WordPress at a glance
function is not described

wc_admin_update_0230_rename_gross_total() WC 1.0

Rename "gross_total" to "total_sales". See: https://github.com/woocommerce/woocommerce-admin/issues/3175

No Hooks.


null. Nothing.



Code of wc_admin_update_0230_rename_gross_total() WC 5.2.2

function wc_admin_update_0230_rename_gross_total() {
	global $wpdb;

	// We first need to drop the new `total_sales` column, since dbDelta() will have created it.
	$wpdb->query( "ALTER TABLE {$wpdb->prefix}wc_order_stats DROP COLUMN `total_sales`" );
	// Then we can rename the existing `gross_total` column.
	$wpdb->query( "ALTER TABLE {$wpdb->prefix}wc_order_stats CHANGE COLUMN `gross_total` `total_sales` double DEFAULT 0 NOT NULL" );