woocommerce_product_csv_importer_args

woocommerce_product_csv_importer_args

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_product_csv_importer_args') is found 2 times:

  • /includes/admin/importers/class-wc-product-csv-importer-controller.php line 93
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    * @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 331
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
        $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' ) );