In a medium saucepan, melt 1 Tbsp of the butter and saute' onion on medium heat.
Reduce heat, add green beans, bacon, salt, pepper, and the other 2 Tbsp of butter. Heat until warm and butter is melted.
Add the vinegar, sugar, and mayonnaise and stir and cook until hot and sugar is dissolved. Serve immediately.