WC_Admin_Importers::product_importer()publicWC 1.0

The product importer.

This has a custom screen - the Tools > Import item is a placeholder. If we're on that screen, redirect to the custom one.

Method of the class: WC_Admin_Importers{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Admin_Importers = new WC_Admin_Importers();
$WC_Admin_Importers->product_importer();

WC_Admin_Importers::product_importer() code WC 8.7.0

public function product_importer() {
	if ( Constants::is_defined( 'WP_LOAD_IMPORTERS' ) ) {
		wp_safe_redirect( admin_url( 'edit.php?post_type=product&page=product_importer' ) );
		exit;
	}

	include_once WC_ABSPATH . 'includes/import/class-wc-product-csv-importer.php';
	include_once WC_ABSPATH . 'includes/admin/importers/class-wc-product-csv-importer-controller.php';

	$importer = new WC_Product_CSV_Importer_Controller();
	$importer->dispatch();
}