PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / trunk
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler vtrunk
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
fluent-cart / app / Models / WpModels / PostMeta.php

PostMeta.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler trunk, at app/Models/WpModels/PostMeta.php

35 lines 677 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Models\WpModels;
4
5 use FluentCart\App\Models\Model;
6
7 class PostMeta extends Model
8 {
9 protected $table = 'postmeta';
10
11 /**
12 * The primary key for the model.
13 *
14 * @var string
15 */
16 protected $primaryKey = 'post_id';
17
18 protected $fillable = [
19 'post_id',
20 'meta_key',
21 'meta_value',
22 ];
23
24 public function setMetaValueAttribute($value)
25 {
26 //phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
27 $this->attributes['meta_value'] = maybe_serialize($value);
28 }
29
30 public function getMetaValueAttribute($value)
31 {
32 return maybe_unserialize($value);
33 }
34 }
35