WC_Admin_Importers::register_importers()publicWC 1.0

Register WordPress based importers.

Method of the class: WC_Admin_Importers{}

No Hooks.

Return

null. Nothing (null).

Usage

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

WC_Admin_Importers::register_importers() code WC 8.7.0

public function register_importers() {
	if ( Constants::is_defined( 'WP_LOAD_IMPORTERS' ) ) {
		add_action( 'import_start', array( $this, 'post_importer_compatibility' ) );
		register_importer( 'woocommerce_product_csv', __( 'WooCommerce products (CSV)', 'woocommerce' ), __( 'Import <strong>products</strong> to your store via a csv file.', 'woocommerce' ), array( $this, 'product_importer' ) );
		register_importer( 'woocommerce_tax_rate_csv', __( 'WooCommerce tax rates (CSV)', 'woocommerce' ), __( 'Import <strong>tax rates</strong> to your store via a csv file.', 'woocommerce' ), array( $this, 'tax_rates_importer' ) );
	}
}