8 – How to get a product variant field (not attribute) value?

I have created a product variant with 1 attribute (say “Subscription Plan” or attribute_sub_plan) and 1 field (say “Number of Issues” or field_num_issues). The attribute was for human readability while the field was an integer for internal use.

The attribute was added to the variation type when created, while the field was added to the variation type on the “Add field” button after creation.

I can easily get the attribute value like this:

$plan_name = $variation->getAttributeValue('attribute_sub_plan')->getName();

However, I cannot get the field value like I usually can with other entities:

$num_issues = $variation->get('field_num_issues')->value;

As a matter of fact, I cannot even get the field “field_num_issues”. It gives me this error:

InvalidArgumentException with message 'Field field_numissues is unknown.'

Do you have any idea how I can get the value?