There is one more option if you want to show file extension that is currently hidden: Finder stores this "hide extension" option in com.apple.FinderInfo extended file attribute. You can check it yourself by running this command which lists all extended attributes:
xattr -l /path/to/the/file
So, in order to show the extension, you can remove that attribute:
xattr -d com.apple.FinderInfo /path/to/the/file
But keep in mind that Finder stores other metadata such as tag color in this attribute, so this metadata will be lost. And, since the attribute is binary, you cannot easily modify it.