WordPress at Your Fingertips
function is not described

WC_Tax_Rate_Importer::dispatch() public WC 1.0

Registered callback function for the WordPress Importer.

Manages the three separate stages of the CSV import process.

{} It's a method of the class: WC_Tax_Rate_Importer{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Tax_Rate_Importer = new WC_Tax_Rate_Importer();
$WC_Tax_Rate_Importer->dispatch();

Code of WC_Tax_Rate_Importer::dispatch() WC 5.9.0

public function dispatch() {

	$this->header();

	$step = empty( $_GET['step'] ) ? 0 : (int) $_GET['step'];

	switch ( $step ) {

		case 0:
			$this->greet();
			break;

		case 1:
			check_admin_referer( 'import-upload' );

			if ( $this->handle_upload() ) {

				if ( $this->id ) {
					$file = get_attached_file( $this->id );
				} else {
					$file = ABSPATH . $this->file_url;
				}

				add_filter( 'http_request_timeout', array( $this, 'bump_request_timeout' ) );

				$this->import( $file );
			}
			break;
	}

	$this->footer();
}