WC_Importer_Tracking::track_product_importer_start()publicWC 1.0

Send a Tracks event when the product importer is started.

Method of the class: WC_Importer_Tracking{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_Importer_Tracking = new WC_Importer_Tracking();
$WC_Importer_Tracking->track_product_importer_start();

WC_Importer_Tracking::track_product_importer_start() code WC 8.7.0

public function track_product_importer_start() {
	// phpcs:disable WordPress.Security.NonceVerification.Recommended
	if ( ! isset( $_REQUEST['file'] ) || ! isset( $_REQUEST['_wpnonce'] ) ) {
		return;
	}

	$properties = array(
		'update_existing' => isset( $_REQUEST['update_existing'] ) ? (bool) $_REQUEST['update_existing'] : false,
		'delimiter'       => empty( $_REQUEST['delimiter'] ) ? ',' : wc_clean( wp_unslash( $_REQUEST['delimiter'] ) ),
	);
	// phpcs:enable

	WC_Tracks::record_event( 'product_import_start', $properties );
}