WooCommerce Code Reference

WC_Importer_Interface

WC_Importer_Interface class.

Table of Contents

get_file_position()  : int
Get file pointer position from the last read.
get_mapped_keys()  : array<string|int, mixed>
Get file mapped headers.
get_parsed_data()  : array<string|int, mixed>
Get parsed data.
get_percent_complete()  : int
Get file pointer position as a percentage of file size.
get_raw_data()  : array<string|int, mixed>
Get raw data.
get_raw_keys()  : array<string|int, mixed>
Get file raw keys.
import()  : array<string|int, mixed>
Process importation.

Methods

import()

Process importation.

public import() : array<string|int, mixed>

Returns an array with the imported and failed items. 'imported' contains a list of IDs. 'failed' contains a list of WP_Error objects.

Example: ['imported' => [], 'failed' => []]

Return values
array<string|int, mixed>