acf-country icon indicating copy to clipboard operation
acf-country copied to clipboard

Make get_countries() public

Open drzraf opened this issue 4 years ago • 1 comments

Details

  • WordPress version: 5.5
  • ACF version: 5.9

Bug summary

I used to relied on acf_country_helpers::get_countries() as a very handy helper when it come to create custom select for the frontend. But it seems you made it private now. I don't see strong reason for that. Would you please mind reconsidering that choice and providing a tagged fixed release

Steps to reproduce

// create our custom select
$countries = acf_country_helpers::get_countries();

drzraf avatar Oct 27 '20 15:10 drzraf

@drzraf You can try the future release of ACF Country here in the 3.x branch:

I made get_countries public. Use it like so:

acf()->fields->get_field_type('country')->get_countries()

nlemoine avatar Nov 21 '22 15:11 nlemoine