I have used the hook, but I have a problem, only the “Store” field appears, but “Store Name” is not available in the selection list. This from the administrator panel.
Is the code missing something?
Just to clarify, the code works and fulfills what was promised. But to improve, you should add the missing field.