admin->get_data(); $alp_has_location = ! empty( $alp_locations_data ) && is_array( $alp_locations_data ); if ( $alp_has_location ) { // Free tier: there is always exactly one location. The edit form reads // $_REQUEST['id'] — surface the row's id so the form can hydrate. $alp_first_location = reset( $alp_locations_data ); if ( is_object( $alp_first_location ) && isset( $alp_first_location->id ) ) { if ( ! isset( $_REQUEST['id'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $_REQUEST['id'] = (string) $alp_first_location->id; // phpcs:ignore WordPress.Security.NonceVerification.Recommended } } } ?>