Skip to content

Commit ff391e8

Browse files
committed
- use acf_get_fields instead of acf_get_raw_fields
1 parent 7b5d0f7 commit ff391e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Registry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ protected function get_acf_fields( $parent_field_group ): array {
475475

476476
// Then check database.
477477
} else {
478-
$raw_fields = acf_get_raw_fields( $parent_field_group['ID'] );
478+
$raw_fields = isset( $parent_field_group['ID'] ) ? acf_get_fields( $parent_field_group['ID'] ) : [];
479479
foreach ( $raw_fields as $raw_field ) {
480480
$fields[] = $raw_field;
481481
}
@@ -743,7 +743,7 @@ public function register_acf_field_groups_to_graphql( array $acf_field_groups =
743743
$interfaces = $this->get_field_group_interfaces( $acf_field_group );
744744

745745
// If there's no fields or type name, we can't register the type to the Schema
746-
if ( empty( $fields ) || empty( $type_name ) ) {
746+
if ( empty( $fields ) ) {
747747
continue;
748748
}
749749

0 commit comments

Comments
 (0)