alternate ending

Shooting (or re-shooting) of a film's ending for theatrical release is called an alternate ending and is usually enforced by the studio for any number of reasons (because of test audience preview results, controversial or unpopular subject matter, to provide a "happy" ending, etc.). See also director's cut.