How to populate a form radio field from WooCommerce attributes

Hi everyone,

I have an issue that bothers me for 2 days and I can’t get it, so I need your help.

I have a pop-up with a form in the Single Product template. The form must have radio fields populated by variable product attributes.

If I put on Options { pa_size } dynamic data, I get only one radio button with all term atrributes as values.

I made a custom function placed in function.php to get an array of terms without links. If I place the function in a code element (Signed), I can see the array with var_dump.

If I put it in the radio Options as { echo:function_name } it does nothing. Here I can’t sign the code.

The function appears as signed in Bricks settings. Please help.