The procedure is called gimp-layer-flatten (something like pdb.gimp_layer_flatten in python). "Remove the alpha channel from the layer if it has one." The opposite function is named gimp-layer-add-alpha, so I'm not sure why they didn't name this one gimp-layer-remove-alpha.
September 3, 2012 - 15:15 — marjancek
Darned naming! I though that function was to merge layers. :|