class-wc-abstract-order-data-store-interface.php
5 years ago
class-wc-coupon-data-store-interface.php
5 years ago
class-wc-customer-data-store-interface.php
5 years ago
class-wc-customer-download-data-store-interface.php
5 years ago
class-wc-customer-download-log-data-store-interface.php
5 years ago
class-wc-importer-interface.php
5 years ago
class-wc-log-handler-interface.php
5 years ago
class-wc-logger-interface.php
5 years ago
class-wc-object-data-store-interface.php
5 years ago
class-wc-order-data-store-interface.php
5 years ago
class-wc-order-item-data-store-interface.php
5 years ago
class-wc-order-item-product-data-store-interface.php
5 years ago
class-wc-order-item-type-data-store-interface.php
5 years ago
class-wc-order-refund-data-store-interface.php
5 years ago
class-wc-payment-token-data-store-interface.php
5 years ago
class-wc-product-data-store-interface.php
5 years ago
class-wc-product-variable-data-store-interface.php
5 years ago
class-wc-queue-interface.php
5 years ago
class-wc-shipping-zone-data-store-interface.php
5 years ago
class-wc-webhooks-data-store-interface.php
5 years ago
class-wc-importer-interface.php
77 lines
| 1 | <?php |
| 2 | /** |
| 3 | * WooCommerce Importer Interface |
| 4 | * |
| 5 | * @package WooCommerce\Interface |
| 6 | * @version 3.1.0 |
| 7 | */ |
| 8 | |
| 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | exit; |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * WC_Importer_Interface class. |
| 15 | */ |
| 16 | interface WC_Importer_Interface { |
| 17 | |
| 18 | /** |
| 19 | * Process importation. |
| 20 | * Returns an array with the imported and failed items. |
| 21 | * 'imported' contains a list of IDs. |
| 22 | * 'failed' contains a list of WP_Error objects. |
| 23 | * |
| 24 | * Example: |
| 25 | * ['imported' => [], 'failed' => []] |
| 26 | * |
| 27 | * @return array |
| 28 | */ |
| 29 | public function import(); |
| 30 | |
| 31 | /** |
| 32 | * Get file raw keys. |
| 33 | * |
| 34 | * CSV - Headers. |
| 35 | * XML - Element names. |
| 36 | * JSON - Keys |
| 37 | * |
| 38 | * @return array |
| 39 | */ |
| 40 | public function get_raw_keys(); |
| 41 | |
| 42 | /** |
| 43 | * Get file mapped headers. |
| 44 | * |
| 45 | * @return array |
| 46 | */ |
| 47 | public function get_mapped_keys(); |
| 48 | |
| 49 | /** |
| 50 | * Get raw data. |
| 51 | * |
| 52 | * @return array |
| 53 | */ |
| 54 | public function get_raw_data(); |
| 55 | |
| 56 | /** |
| 57 | * Get parsed data. |
| 58 | * |
| 59 | * @return array |
| 60 | */ |
| 61 | public function get_parsed_data(); |
| 62 | |
| 63 | /** |
| 64 | * Get file pointer position from the last read. |
| 65 | * |
| 66 | * @return int |
| 67 | */ |
| 68 | public function get_file_position(); |
| 69 | |
| 70 | /** |
| 71 | * Get file pointer position as a percentage of file size. |
| 72 | * |
| 73 | * @return int |
| 74 | */ |
| 75 | public function get_percent_complete(); |
| 76 | } |
| 77 |