Problem
I am unable to add a single Import Images field without the add-on creating an superfluous section above -- for example, this code:
$this->add_on = new RapidAddon( 'Variant Images', 'variant_gallery' );
$this->add_on->import_images( 'variant_gallery', 'Variant Images', 'images', [ $this, 'variant_images' ] );
Renders two sections that both say "Variant Images."

The first contains the following error (because there not any fields associated with it):
Warning: Invalid argument supplied for foreach() in [[PATH]]/rapid-addon.php on line 425
Warning: Invalid argument supplied for foreach() in [PATH]]/rapid-addon.php on line 432
The second section renders correctly with the proper image settings as shown in the screenshot above.
To Solve
I have modified the code at line 420 to check if fields exist before adding the section, and this correct the issue i.e.:
if($this->fields) {
echo $this->helper_metabox_top($this->name);
$visible_fields = 0;
foreach ($this->fields as $field_slug => $field_params) {
if ($field_params['is_sub_field']) continue;
$visible_fields++;
}
...
}
However, if I am using the API incorrectly to add the images field, please let me know.
Problem
I am unable to add a single Import Images field without the add-on creating an superfluous section above -- for example, this code:
Renders two sections that both say "Variant Images."
The first contains the following error (because there not any fields associated with it):
The second section renders correctly with the proper image settings as shown in the screenshot above.
To Solve
I have modified the code at line 420 to check if fields exist before adding the section, and this correct the issue i.e.:
However, if I am using the API incorrectly to add the images field, please let me know.