woocommerce – How to retrieve a Menu Name by Menu Location with ACF fields


To retrieve the Menu Name:

$menu_name = wp_get_nav_menu_name("menu-products");

Then, using the menu name you can get data like the nav menu:

$term = get_term_by('name', $menu_name, 'nav_menu');

And using the term taxonomy ID you can pull the ACF fields

$menu_id = $term->term_taxonomy_id;
$post_id = 'term_'.$menu_id;
$field = get_field('my_acf_field', $post_id);

On the CMS side, the ACF Group, you need to select the Rule:
Menu Item | Is equal to | Product Location