I use this trick all the time to quickly flatten a layer in photoshop that may have an effect or style added to it.
This is very handy when you need to, for instance, add a double stroke to a layer or add noise or an additional effect to a layer that already has a style on it.
Simply right click on the layer that your want to flatten and click on ‘Convert to Smart Object’. This will flatten the layer together but will also make the layer un-editable to certain conditions. So now right click on your layer again and click on ‘Rasterize Layer’ and thats it.
So for instance, if you wanted a double stroke on a layer, you would double click the layer and add your first stroke, flatten your layer as above and then redo step one to add your second stroke.