I am trying to use the function addAttributeOption
to add a new option to an attribute. I do not want to change the current option order or defaults but simply want to append a new option to the end of the list.
Firstly I tried to get all the options on the attribute and simply append the new one as follows.
$attributeModel->getSource()->getAllOptions();
But then it complains about the lack of default value. Ideally I do not want to have to reformat the array returned from getAllOptions
as it only returns value
and label
.