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

apply_filters('woocommerce_product_csv_importer_args') is found 2 times:

  • /includes/admin/importers/class-wc-product-csv-importer-controller.php line 91
    	 * @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 330
    			$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' ) );