woocommerce_product_csv_importer_class

woocommerce_product_csv_importer_class

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

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_product_csv_importer_class') is found 3 times:

  • /includes/admin/importers/class-wc-product-csv-importer-controller.php line 92
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    * @param  array  $args Importer arguments.
     * @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 326
    323
    324
    325
    326
    327
    328
    329
    330
    331
    if ( file_exists( $csv_file ) && class_exists( 'WC_Product_CSV_Importer' ) ) {
        // Override locale so we can return mappings from WooCommerce in English language stores.
        add_filter( 'locale', '__return_false', 9999 );
        $importer_class = apply_filters( 'woocommerce_product_csv_importer_class', 'WC_Product_CSV_Importer' );
        $args           = array(
            'parse'   => true,
            'mapping' => self::get_header_mappings( $csv_file ),
        );
        $args           = apply_filters( 'woocommerce_product_csv_importer_args', $args, $importer_class );
  • /src/Admin/API/OnboardingTasks.php line 399
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    */
    public static function get_header_mappings( $file ) {
        include_once WC_ABSPATH . 'includes/admin/importers/mappings/mappings.php';
     
        $importer_class  = apply_filters( 'woocommerce_product_csv_importer_class', 'WC_Product_CSV_Importer' );
        $importer        = new $importer_class( $file, array() );
        $raw_headers     = $importer->get_raw_keys();
        $default_columns = wc_importer_default_english_mappings( array() );
        $special_columns = wc_importer_default_special_english_mappings( array() );
     
        $headers = array();