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-email-log.php

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

37 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace StoreEngine\Database;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 class CreateEmailLog {
9 public static function up( $prefix, $charset_collate ) {
10 $table_name = $prefix . 'storeengine_email_log';
11 $sql = "CREATE TABLE IF NOT EXISTS {$table_name} (
12 `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
13 `sent_at_gmt` datetime NOT NULL,
14 `email_type` varchar(100) NOT NULL,
15 `recipient` varchar(320) NOT NULL,
16 `subject` varchar(500) NOT NULL,
17 `status` varchar(20) NOT NULL,
18 `customer_id` bigint(20) unsigned NULL DEFAULT NULL,
19 `order_id` bigint(20) unsigned NULL DEFAULT NULL,
20 `related_entity_type` varchar(50) NULL DEFAULT NULL,
21 `related_entity_id` bigint(20) unsigned NULL DEFAULT NULL,
22 `error_message` text NULL DEFAULT NULL,
23 `payload` longtext NULL DEFAULT NULL,
24 PRIMARY KEY (`id`),
25 KEY `sent_at_gmt` (`sent_at_gmt`),
26 KEY `email_type` (`email_type`),
27 KEY `status` (`status`),
28 KEY `recipient` (`recipient`(191)),
29 KEY `customer_id` (`customer_id`),
30 KEY `order_id` (`order_id`),
31 KEY `related` (`related_entity_type`, `related_entity_id`)
32 ) $charset_collate;";
33
34 dbDelta( $sql );
35 }
36 }
37