# wpvr/9.0.2/src/Api/Repositories/TourRepository.php

WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress, version 9.0.2. 25 lines.

- Page: https://pluginprobe.com/plugins/wpvr/9.0.2/code/src/Api/Repositories/TourRepository.php
- Raw: https://pluginprobe.com/plugins/wpvr/9.0.2/raw/src/Api/Repositories/TourRepository.php
- Modified: 2026-08-20T11:07:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpvr/9.0.2/code/src/Api/Repositories/TourRepository.php#L10-L20`.

```php
<?php

namespace RexTheme\WPVR\Api\Repositories;

use RexTheme\WPVR\Api\Contracts\RepositoryInterface;

class TourRepository implements RepositoryInterface {

    const META_KEY = 'panodata';

    public function find( int $id ): array {
        $raw = get_post_meta( $id, self::META_KEY, true );
        return is_array( $raw ) ? $raw : [];
    }

    public function save( int $id, array $data ): bool {
        $result = update_post_meta( $id, self::META_KEY, $data );
        // update_post_meta returns false both on real failure and when value is unchanged
        if ( false === $result ) {
            return get_post_meta( $id, self::META_KEY, true ) == $data;
        }
        return true;
    }
}

```
