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.
{} Это метод класса: WC_Tax_Rate_Importer{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
$WC_Tax_Rate_Importer = new WC_Tax_Rate_Importer(); $WC_Tax_Rate_Importer->dispatch();
Код WC_Tax_Rate_Importer::dispatch() WC Tax Rate Importer::dispatch WC 5.0.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();
}