# fluent-cart/1.6.4/app/Models/WpModels/PostMeta.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.6.4. 35 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.6.4/code/app/Models/WpModels/PostMeta.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.6.4/raw/app/Models/WpModels/PostMeta.php
- Modified: 2025-10-14T16:36:46+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/fluent-cart/1.6.4/code/app/Models/WpModels/PostMeta.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Models\WpModels;

use FluentCart\App\Models\Model;

class PostMeta extends Model
{
    protected $table = 'postmeta';

    /**
     * The primary key for the model.
     *
     * @var string
     */
    protected $primaryKey = 'post_id';

    protected $fillable = [
        'post_id',
        'meta_key',
        'meta_value',
    ];

    public function setMetaValueAttribute($value)
    {
        //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
        $this->attributes['meta_value'] = maybe_serialize($value);
    }

    public function getMetaValueAttribute($value)
    {
        return maybe_unserialize($value);
    }
}

```
