PluginProbe
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More / 2.2.0
StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More v2.2.0
2.3.0 2.2.0 2.1.1 2.1.0 2.0.0 1.10.0 1.9.1 1.9.0 1.2.1 1.2.2 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 All 59 releases
storeengine / includes / database / create-subscriptions.php

create-subscriptions.php in StoreEngine — Complete eCommerce Solution with Memberships, Licensing, Affiliates & More 2.2.0, at includes/database/create-subscriptions.php

30 lines 872 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace StoreEngine\Database;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 class CreateSubscriptions {
10
11 public static function up( $prefix, $charset_collate ) {
12 $table_name = $prefix . 'storeengine_subscriptions';
13 $sql = "CREATE TABLE {$table_name} (
14 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
15 `user_id` INT(11) NOT NULL,
16 `product_id` INT(11) NOT NULL,
17 `price_id` INT(11) NOT NULL,
18 `status` VARCHAR(255) NOT NULL,
19 `interval` INT(11) NOT NULL,
20 `interval_type` VARCHAR(255) NOT NULL,
21 `hook` VARCHAR(255) NOT NULL,
22 `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
23 `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
24 PRIMARY KEY (`id`)
25 ) $charset_collate;";
26
27 dbDelta( $sql );
28 }
29 }
30