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.8.7.0

apply_filters('woocommerce_product_csv_importer_class') is found 3 times:

  • /includes/admin/importers/class-wc-product-csv-importer-controller.php line 90
    	 * @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 325
     
    		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 398
    	 */
    	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();