Files
.circleci
assets
bin
data
inc
admin-pages
api
builders
checkout
compat
contracts
country
database
broadcasts
checkout-forms
customers
discount-codes
domains
emails
engine
events
memberships
payments
class-payment-query.php
class-payment-status.php
class-payments-meta-table.php
class-payments-schema.php
class-payments-table.php
posts
products
sites
webhooks
debug
deprecated
development
domain-mapping
duplication
exception
functions
gateways
helpers
installers
integrations
internal
invoices
limitations
limits
list-tables
loaders
managers
mercator
models
next
objects
site-templates
sso
tax
traits
ui
updater
class-admin-notices.php
class-admin-themes-compatibility.php
class-ajax.php
class-api.php
class-async-calls.php
class-autoloader.php
class-cron.php
class-current.php
class-dashboard-statistics.php
class-dashboard-widgets.php
class-documentation.php
class-domain-mapping.php
class-faker.php
class-geolocation.php
class-helper.php
class-hooks.php
class-license.php
class-light-ajax.php
class-logger.php
class-maintenance-mode.php
class-newsletter.php
class-requirements.php
class-scripts.php
class-session-cookie.php
class-settings.php
class-sunrise.php
class-user-switching.php
class-views.php
class-whitelabel.php
class-wp-ultimo.php
lang
patches
tests
utils
views
.gitignore
.phpcs.xml.dist
LICENSE
autoload.php
composer.json
composer.lock
constants.php
loco.xml
phpstan.neon.dist
phpunit.xml.dist
readme.txt
rector.php
sunrise.php
uninstall.php
wp-multisite-waas.php
wp-multisite-waas/inc/database/payments/class-payments-meta-table.php
2025-02-08 13:57:32 -07:00

80 lines
1.3 KiB
PHP

<?php
/**
* Class used for querying payments' meta data.
*
* @package WP_Ultimo
* @subpackage Database\Payments
* @since 2.0.0
*/
namespace WP_Ultimo\Database\Payments;
use WP_Ultimo\Database\Engine\Table;
// Exit if accessed directly
defined('ABSPATH') || exit;
/**
* Setup the "wu_paymentmeta" database table
*
* @since 2.0.0
*/
final class Payments_Meta_Table extends Table {
/**
* Table name
*
* @since 2.0.0
* @var string
*/
protected $name = 'paymentmeta';
/**
* Is this table global?
*
* @since 2.0.0
* @var boolean
*/
protected $global = true;
/**
* Table current version
*
* @since 2.0.0
* @var string
*/
protected $version = '2.0.0';
/**
* Payments constructor.
*
* @access public
* @since 2.0.0
* @return void
*/
public function __construct() {
parent::__construct();
}
/**
* Setup the database schema
*
* @access protected
* @since 2.0.0
* @return void
*/
protected function set_schema(): void {
$max_index_length = 191;
$this->schema = "meta_id bigint(20) unsigned NOT NULL auto_increment,
wu_payment_id bigint(20) unsigned NOT NULL default '0',
meta_key varchar(255) DEFAULT NULL,
meta_value longtext DEFAULT NULL,
PRIMARY KEY (meta_id),
KEY wu_payment_id (wu_payment_id),
KEY meta_key (meta_key({$max_index_length}))";
}
}