WC_Tax_Rate_Importer
extends WP_Importer
in package
Tax Rates importer - import tax rates and local tax rates into WooCommerce.
Tags
Table of Contents
- $delimiter : string
- The current delimiter.
- $file_url : string
- The current file url.
- $id : int
- The current file id.
- $import_error_message : string
- Error message for import.
- $import_page : string
- The current import page.
- __construct() : mixed
- Constructor.
- bump_request_timeout() : int
- Added to http_request_timeout filter to force timeout at 60 seconds during import.
- dispatch() : mixed
- Registered callback function for the WordPress Importer.
- footer() : mixed
- Output footer html.
- format_data_from_csv() : string
- UTF-8 encode the data if `$enc` value isn't UTF-8.
- greet() : mixed
- Output information about the uploading process.
- handle_upload() : bool
- Handles the CSV upload and initial parsing of the file to prepare for.
- header() : mixed
- Output header html.
- import() : mixed
- Import the file if it exists and is valid.
- import_end() : mixed
- Performs post-import cleanup of files and the cache.
- set_import_error_message() : mixed
- Set the import error message.
- import_error() : mixed
- Show import error and quit.
- import_start() : mixed
- Import is starting.
Properties
$delimiter
The current delimiter.
public
string
$delimiter
$file_url
The current file url.
public
string
$file_url
$id
The current file id.
public
int
$id
$import_error_message
Error message for import.
public
string
$import_error_message
$import_page
The current import page.
public
string
$import_page
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —bump_request_timeout()
Added to http_request_timeout filter to force timeout at 60 seconds during import.
public
bump_request_timeout(int $val) : int
Parameters
- $val : int
-
Value.
Return values
int — 60dispatch()
Registered callback function for the WordPress Importer.
public
dispatch() : mixed
Manages the three separate stages of the CSV import process.
Return values
mixed —footer()
Output footer html.
public
footer() : mixed
Return values
mixed —format_data_from_csv()
UTF-8 encode the data if `$enc` value isn't UTF-8.
public
format_data_from_csv(mixed $data, string $enc) : string
Parameters
- $data : mixed
-
Data.
- $enc : string
-
Encoding.
Return values
string —greet()
Output information about the uploading process.
public
greet() : mixed
Return values
mixed —handle_upload()
Handles the CSV upload and initial parsing of the file to prepare for.
public
handle_upload() : bool
displaying author import options.
Return values
bool — False if error uploading or invalid file, true otherwiseheader()
Output header html.
public
header() : mixed
Return values
mixed —import()
Import the file if it exists and is valid.
public
import(mixed $file) : mixed
Parameters
- $file : mixed
-
File.
Return values
mixed —import_end()
Performs post-import cleanup of files and the cache.
public
import_end() : mixed
Return values
mixed —set_import_error_message()
Set the import error message.
protected
set_import_error_message(string $message) : mixed
Parameters
- $message : string
-
Error message.
Return values
mixed —import_error()
Show import error and quit.
private
import_error([string $message = '' ]) : mixed
Parameters
- $message : string = ''
-
Error message.
Return values
mixed —import_start()
Import is starting.
private
import_start() : mixed