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.

Метод класса: WC_Admin_Importers{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Код WC_Admin_Importers::product_importer() 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();
}