Custom element options not working after update to Pro 4.3

Hello,
We have a site that uses a child theme of pro and a custom plugin that creates custom elements. Since a recent update we have not been able to select the dropdown options that we coded for these.

When testing I have found that if I hard code these in the controls array they seem to work but as soon as I add in dynamic data which is being generated using get_terms it no longer shows up in the drop down list in pro admin

This is an example of how we were generating one of these lists. I have tried various other methods.

Thanks in advance
James Corkhill (developer)

            'choices' => array_merge(array(array('value' => '', 'label' => 'All')),
                array_map(
                    function ($term) {
                        return array('value' => $term->term_id, 'label' => __($term->name, 'tarmac'));
                    },
                    get_terms(array(
                        'taxonomy' => 'material_type',
                        'orderby' => 'name',
                        'hierarchical' => 1,
                        'hide_empty' => 0
                    ))
                )
            ),
        )

Hello @TarmacWebTeam,

Thanks for writing to us.

The feature that you want would require custom development. I would suggest you contact a developer who can assist you with your concern or you can avail of our services called One where customization questions are answered. Please note we don’t provide custom development support. It is out of the support scope.

In case if you have an idea about coding please have a look at our doc to learn more about how to create the custom elements.



Thanks for understnding

Hello,
I wrote the above post as I am a developer, and as you can see I included the peice of code that no longer works with your theme, but used to. I would have hoped that you would be able to assist developers with any changes that had been made to the main theme in order to adjust the code.

Regards
James

Hey James,

We apologize for the confusion. We’d be happy to investigate if there’s a problem with our API so please share the version of your plugin that uses hardcoded data and the version using dynamic data so we could compare and see which part of the API is affected.

Please also provide the WordPress version you’re using.

Although please still note that what we’ll do is check if there’s a problem with the API only. If the issue is beyond the scope of our API, it would be your responsibility to fix.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.