WC_Product_CSV_Importer_Controller::auto_map_user_preferences
Map columns using the user's latest import mappings.
Метод класса: WC_Product_CSV_Importer_Controller{}
Хуков нет.
Возвращает
Массив.
Использование
$WC_Product_CSV_Importer_Controller = new WC_Product_CSV_Importer_Controller(); $WC_Product_CSV_Importer_Controller->auto_map_user_preferences( $headers );
- $headers(массив) (обязательный)
- Header columns.
Код WC_Product_CSV_Importer_Controller::auto_map_user_preferences() WC Product CSV Importer Controller::auto map user preferences WC 10.8.1
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;
}