WordPress at Your Fingertips
function is not described

WC_Product_CSV_Importer_Controller::auto_map_user_preferences() public WC 1.0

Map columns using the user's lastest import mappings.

{} It's a method of the class: WC_Product_CSV_Importer_Controller{}

No Hooks.

Return

Array.

Usage

$WC_Product_CSV_Importer_Controller = new WC_Product_CSV_Importer_Controller();
$WC_Product_CSV_Importer_Controller->auto_map_user_preferences( $headers );
$headers(array) (required)
Header columns.

Code of WC_Product_CSV_Importer_Controller::auto_map_user_preferences() WC 5.9.0

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;
}