Skip to content

Commit 8189e02

Browse files
authored
Update wp-rest-api-v2-menus.php
Fix fatal error: "Cannot use object of type WP_Term as array"
1 parent 41d350f commit 8189e02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wp-rest-api-v2-menus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function wp_api_v2_menus_get_all_menus() {
1919
if ( class_exists( 'acf' ) ) {
2020
$fields = get_fields( $menu );
2121
if ( ! empty( $fields ) ) {
22-
$menu[ $key ]->acf = new stdClass();
22+
$menus[ $key ]->acf = new stdClass();
2323

2424
foreach ( $fields as $field_key => $item ) {
2525
// add all acf custom fields

0 commit comments

Comments
 (0)