WordPress at a glance
function is not described

wc_importer_shopify_expand_data() WC 3.7.0

Expand special Shopify columns to WC format.

No Hooks.

Return

Array. Expanded data.

Usage

wc_importer_shopify_expand_data( $data );
$data(array) (required)
Array of data.

Changelog

Since 3.7.0 Introduced.

Code of wc_importer_shopify_expand_data() WC 5.3.0

<?php
function wc_importer_shopify_expand_data( $data ) {
	if ( isset( $data['meta:shopify_requires_shipping'] ) ) {
		$requires_shipping = wc_string_to_bool( $data['meta:shopify_requires_shipping'] );

		if ( ! $requires_shipping ) {
			if ( isset( $data['type'] ) ) {
				$data['type'][] = 'virtual';
			} else {
				$data['type'] = array( 'virtual' );
			}
		}

		unset( $data['meta:shopify_requires_shipping'] );
	}
	return $data;
}