2012-09-10 11:26:26 +00:00
< ? php
/**
* Init / register importers for WooCommerce .
*
* @ author WooThemes
* @ category Admin
* @ package WooCommerce / Admin / Importers
* @ version 1.7 . 0
*/
2012-10-15 10:32:24 +00:00
if ( ! defined ( 'ABSPATH' ) ) exit ; // Exit if accessed directly
2012-09-10 11:26:26 +00:00
register_importer ( 'woocommerce_tax_rate_csv' , __ ( 'WooCommerce Tax Rates (CSV)' , 'woocommerce' ), __ ( 'Import <strong>tax rates</strong> to your store via a csv file.' , 'woocommerce' ), 'woocommerce_tax_rates_importer' );
/**
* woocommerce_tax_rates_importer function .
2012-11-27 16:22:47 +00:00
*
2012-09-10 11:26:26 +00:00
* @ access public
* @ return void
*/
function woocommerce_tax_rates_importer () {
// Load Importer API
require_once ABSPATH . 'wp-admin/includes/import.php' ;
if ( ! class_exists ( 'WP_Importer' ) ) {
$class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php' ;
2012-11-27 16:22:47 +00:00
if ( file_exists ( $class_wp_importer ) )
2012-09-10 11:26:26 +00:00
require $class_wp_importer ;
}
// includes
require dirname ( __FILE__ ) . '/tax-rates-importer.php' ;
// Dispatch
$WC_CSV_Tax_Rates_Import = new WC_CSV_Tax_Rates_Import ();
$WC_CSV_Tax_Rates_Import -> dispatch ();
}