PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.18.0
GiveWP – Donation Plugin and Fundraising Platform v4.18.0
4.18.0 4.17.0 4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 All 257 releases
give / src / LegacySubscriptions / includes / give-recurring-db-subscription-meta.php

give-recurring-db-subscription-meta.php in GiveWP – Donation Plugin and Fundraising Platform 4.18.0, at src/LegacySubscriptions/includes/give-recurring-db-subscription-meta.php

76 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Subscription Meta DB class
4 *
5 * @package Give
6 * @copyright Copyright (c) 2016, GiveWP
7 * @license https://opensource.org/licenses/gpl-license GNU Public License
8 * @since 1.8
9 */
10
11 // Exit if accessed directly.
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 /**
17 * Class Give_Recurring_DB_Subscription_Meta
18 *
19 * This class is for interacting with the subscription meta database table.
20 * @since 2.19.0 - migrated from give-recurring
21 * @since 1.8
22 */
23 class Give_Recurring_DB_Subscription_Meta extends Give_DB_Meta {
24
25 /**
26 * Meta supports.
27 *
28 * @since 1.8
29 * @access protected
30 * @var array
31 */
32 protected $supports = array();
33
34 /**
35 * Meta type
36 *
37 * @since 1.8
38 * @access protected
39 * @var bool
40 */
41 protected $meta_type = 'subscription';
42
43 /**
44 * Give_Recurring_DB_Subscription_Meta constructor.
45 *
46 * @access public
47 * @since 1.8
48 */
49 public function __construct() {
50 global $wpdb;
51
52 $wpdb->subscriptionmeta = $this->table_name = $wpdb->prefix . 'give_subscriptionmeta';
53 $this->primary_key = 'meta_id';
54 $this->version = '1.0';
55
56 parent::__construct();
57 }
58
59 /**
60 * Get table columns and data types.
61 *
62 * @access public
63 * @since 1.8
64 *
65 * @return array Columns and formats.
66 */
67 public function get_columns() {
68 return array(
69 'meta_id' => '%d',
70 'subscription_id' => '%d',
71 'meta_key' => '%s',
72 'meta_value' => '%s',
73 );
74 }
75 }
76