WC_Admin_Importers::do_ajax_product_import
Ajax callback for importing one batch of products from a CSV.
Method of the class: WC_Admin_Importers{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Admin_Importers = new WC_Admin_Importers(); $WC_Admin_Importers->do_ajax_product_import();
WC_Admin_Importers::do_ajax_product_import() WC Admin Importers::do ajax product import code WC 10.7.0
public function do_ajax_product_import() {
if ( ! $this->import_allowed() ) {
wp_send_json_error( array( 'message' => __( 'Insufficient privileges to import products.', 'woocommerce' ) ) );
}
include_once WC_ABSPATH . 'includes/admin/importers/class-wc-product-csv-importer-controller.php';
WC_Product_CSV_Importer_Controller::dispatch_ajax();
}