WC_Tax_Rate_Importer::dispatch()
Registered callback function for the WordPress Importer.
Manages the three separate stages of the CSV import process.
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();
WC_Tax_Rate_Importer::dispatch() WC Tax Rate Importer::dispatch code WC 7.5.1
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 ); } else { $this->import_error( $this->import_error_message ); } break; } $this->footer(); }