';
printf(
/* translators: %s: tax rates count */
esc_html__( 'Import complete - imported %s tax rates.', 'woocommerce' ),
'' . absint( $loop ) . ''
);
echo '
';
$this->import_end();
}
/**
* Performs post-import cleanup of files and the cache.
*/
public function import_end() {
echo '';
echo '
' . esc_html__( 'Hi there! Upload a CSV file containing tax rates to import the contents into your shop. Choose a .csv file to upload, then click "Upload file and import".', 'woocommerce' ) . '
';
/* translators: 1: Link to tax rates sample file 2: Closing link. */
echo '
' . sprintf( esc_html__( 'Your CSV needs to include columns in a specific order. %1$sClick here to download a sample%2$s.', 'woocommerce' ), '', '' ) . '
';
$action = 'admin.php?import=woocommerce_tax_rate_csv&step=1';
$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
$size = size_format( $bytes );
$upload_dir = wp_upload_dir();
if ( ! empty( $upload_dir['error'] ) ) :
?>
';
}
/**
* Show import error and quit.
*
* @param string $message Error message.
*/
private function import_error( $message = '' ) {
echo '
' . esc_html__( 'Sorry, there has been an error.', 'woocommerce' ) . '
';
if ( $message ) {
echo esc_html( $message );
}
echo '
';
$this->footer();
die();
}
/**
* Added to http_request_timeout filter to force timeout at 60 seconds during import.
*
* @param int $val Value.
* @return int 60
*/
public function bump_request_timeout( $val ) {
return 60;
}
}