WC_Admin_Importers
in package
WC_Admin_Importers Class.
Table of Contents
- $importers : array<string|int, string>
- Array of importer IDs.
- __construct() : mixed
- Constructor.
- add_to_menus() : mixed
- Add menu items for our custom importers.
- admin_scripts() : mixed
- Register importer scripts.
- do_ajax_product_import() : mixed
- Ajax callback for importing one batch of products from a CSV.
- hide_from_menus() : mixed
- Hide menu items from view so the pages exist, but the menu items do not.
- post_importer_compatibility() : mixed
- When running the WP XML importer, ensure attributes exist.
- product_importer() : mixed
- The product importer.
- register_importers() : mixed
- Register WordPress based importers.
- tax_rates_importer() : mixed
- The tax rate importer which extends WP_Importer.
- import_allowed() : bool
- Return true if WooCommerce imports are allowed for current user, false otherwise.
Properties
$importers
Array of importer IDs.
protected
array<string|int, string>
$importers
= array()
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —add_to_menus()
Add menu items for our custom importers.
public
add_to_menus() : mixed
Return values
mixed —admin_scripts()
Register importer scripts.
public
admin_scripts() : mixed
Return values
mixed —do_ajax_product_import()
Ajax callback for importing one batch of products from a CSV.
public
do_ajax_product_import() : mixed
Return values
mixed —hide_from_menus()
Hide menu items from view so the pages exist, but the menu items do not.
public
hide_from_menus() : mixed
Return values
mixed —post_importer_compatibility()
When running the WP XML importer, ensure attributes exist.
public
post_importer_compatibility() : mixed
WordPress import should work - however, it fails to import custom product attribute taxonomies. This code grabs the file before it is imported and ensures the taxonomies are created.
Return values
mixed —product_importer()
The product importer.
public
product_importer() : mixed
This has a custom screen - the Tools > Import item is a placeholder. If we're on that screen, redirect to the custom one.
Return values
mixed —register_importers()
Register WordPress based importers.
public
register_importers() : mixed
Return values
mixed —tax_rates_importer()
The tax rate importer which extends WP_Importer.
public
tax_rates_importer() : mixed
Return values
mixed —import_allowed()
Return true if WooCommerce imports are allowed for current user, false otherwise.
protected
import_allowed() : bool