WC_Product_CSV_Importer_Controller::auto_map_user_preferences( array $headers )

Map columns using the user’s lastest import mappings.


Description Description


Parameters Parameters

$headers

(Required) Header columns.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/admin/importers/class-wc-product-csv-importer-controller.php

	public function auto_map_user_preferences( $headers ) {
		$mapping_preferences = get_user_option( 'woocommerce_product_import_mapping' );

		if ( ! empty( $mapping_preferences ) && is_array( $mapping_preferences ) ) {
			return $mapping_preferences;
		}

		return $headers;
	}

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.