woocommerce_product_csv_importer_args, $args, $importer_class
woocommerce_product_csv_importer_args, $args, $importer_class
Appears in: woocommerce.11.0.0
Hook Type: filter
Displaying hooks found in version: woocommerce.11.0.0apply_filters('woocommerce_product_csv_importer_args, $args, $importer_class') is found 2 times:
- /includes/admin/importers/class-wc-product-csv-importer-controller.php line 94
* @return WC_Product_CSV_Importer */ public static function get_importer( $file, $args = array() ) { $importer_class = apply_filters( 'woocommerce_product_csv_importer_class', 'WC_Product_CSV_Importer' ); $args = apply_filters( 'woocommerce_product_csv_importer_args', $args, $importer_class ); return new $importer_class( $file, $args ); } /** * Check whether a file is a valid CSV file. * - /src/Admin/API/OnboardingTasks.php line 332
$args = array( 'parse' => true, 'mapping' => self::get_header_mappings( $csv_file ), ); $args = apply_filters( 'woocommerce_product_csv_importer_args', $args, $importer_class ); $importer = new $importer_class( $csv_file, $args ); $import = $importer->import(); return $import; } else { return new \WP_Error( 'woocommerce_rest_import_error', __( 'Sorry, the sample products data file was not found.', 'woocommerce' ) );