headstartwp icon indicating copy to clipboard operation
headstartwp copied to clipboard

ACF fields missing in the menu REST payload.

Open Knskan3 opened this issue 9 months ago • 0 comments

https://github.com/10up/headstartwp/blob/4744f560bbb914a163e2575997b787fbf71e58b8/wp/headless-wp/includes/classes/API/AppEndpoint.php#L210

The current implementation doesn't include the ACF fields to the menu items.

When using ACF, here's a solution to add the fields.

			$acf_fields = get_fields($menu_item->ID);
			$filtered_menu_item->acf = $acf_fields;

Knskan3 avatar May 21 '24 08:05 Knskan3