WC_Products_Tracking::is_importing()privateWC 1.0

Check if the current process is importing products.

Method of the class: WC_Products_Tracking{}

No Hooks.

Return

true|false. True if importing, false otherwise.

Usage

// private - for code of main (parent) class only
$result = $this->is_importing();

WC_Products_Tracking::is_importing() code WC 9.7.1

private function is_importing() {
	// phpcs:disable WordPress.Security.NonceVerification.Missing
	// Check if the current request is a product import.
	if ( isset( $_POST['action'] ) && 'woocommerce_do_ajax_product_import' === $_POST['action'] ) {
		return true;
	}
	return false;
	// phpcs:enable
}