wp_wpinv_subscriptions
StaticStores wpinv subscriptions data created by this plugin.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| 🔑id | bigint(20) unsigned | NO |
| customer_id | bigint(20) | NO |
| frequency | int(11) | NO |
| period | varchar(20) | NO |
| initial_amount | DECIMAL(16,4) | NO |
| recurring_amount | DECIMAL(16,4) | NO |
| bill_times | bigint(20) | NO |
| transaction_id | varchar(60) | NO |
| parent_payment_id | bigint(20) | NO |
| product_id | bigint(20) | NO |
| created | datetime | NO |
| expiration | datetime | NO |
| trial_period | varchar(20) | NO |
| profile_id | varchar(60) | NO |
| status | varchar(20) | NO |
| customer_id | BIGINT(20) | NO |
| number | VARCHAR(100) | YES |
| invoice_key | VARCHAR(100) | YES |
| type | VARCHAR(100) | NO |
| mode | VARCHAR(100) | NO |
| user_ip | VARCHAR(100) | YES |
| first_name | VARCHAR(100) | YES |
| last_name | VARCHAR(100) | YES |
| address | VARCHAR(100) | YES |
| city | VARCHAR(100) | YES |
| state | VARCHAR(100) | YES |
| country | VARCHAR(100) | YES |
| zip | VARCHAR(100) | YES |
| adddress_confirmed | INT(10) | YES |
| gateway | VARCHAR(100) | YES |
| transaction_id | VARCHAR(100) | YES |
| currency | VARCHAR(10) | YES |
| subtotal | DECIMAL(16,4) | NO |
| tax | DECIMAL(16,4) | NO |
| fees_total | DECIMAL(16,4) | NO |
| total | DECIMAL(16,4) | NO |
| discount | DECIMAL(16,4) | NO |
| discount_code | VARCHAR(100) | YES |
| disable_taxes | INT(2) | NO |
| due_date | DATETIME | YES |
| completed_date | DATETIME | YES |
| company | VARCHAR(100) | YES |
| vat_number | VARCHAR(100) | YES |
| vat_rate | VARCHAR(100) | YES |
| custom_meta | TEXT | YES |
| is_anonymized | INT(2) | NO |
| post_id | BIGINT(20) | NO |
| item_id | BIGINT(20) | NO |
| item_name | TEXT | NO |
| item_description | TEXT | NO |
| vat_rate | FLOAT | NO |
| vat_class | VARCHAR(100) | YES |
| tax | DECIMAL(16,4) | NO |
| item_price | DECIMAL(16,4) | NO |
| custom_price | DECIMAL(16,4) | NO |
| quantity | DECIMAL(16,4) | NO |
| discount | DECIMAL(16,4) | NO |
| subtotal | DECIMAL(16,4) | NO |
| price | DECIMAL(16,4) | NO |
| meta | TEXT | YES |
| fees | TEXT | YES |
| user_id | BIGINT(20) | NO |
| VARCHAR(100) | NO | |
| email_cc | TEXT | YES |
| status | VARCHAR(100) | NO |
| purchase_value | DECIMAL(18,9) | NO |
| purchase_count | BIGINT(20) | NO |
| user_id | and | YES |
CREATE TABLE Statement
CREATE TABLE wp_wpinv_subscriptions ( id bigint(20) unsigned NOT NULL auto_increment, customer_id bigint(20) NOT NULL, frequency int(11) NOT NULL DEFAULT '1', period varchar(20) NOT NULL, initial_amount DECIMAL(16,4) NOT NULL, recurring_amount DECIMAL(16,4) NOT NULL, bill_times bigint(20) NOT NULL, transaction_id varchar(60) NOT NULL, parent_payment_id bigint(20) NOT NULL, product_id bigint(20) NOT NULL, created datetime NOT NULL, expiration datetime NOT NULL, trial_period varchar(20) NOT NULL, profile_id varchar(60) NOT NULL, status varchar(20) NOT NULL, PRIMARY KEY (id), KEY profile_id (profile_id), KEY customer (customer_id), KEY transaction (transaction_id), KEY customer_and_status (customer_id, status) ) $charset_collate;"; // Invoices. $schema['invoices'] = "CREATE TABLE wp_getpaid_invoices ( post_id BIGINT(20) NOT NULL, customer_id BIGINT(20) NOT NULL DEFAULT 0, `number` VARCHAR(100), invoice_key VARCHAR(100), `type` VARCHAR(100) NOT NULL DEFAULT 'invoice', mode VARCHAR(100) NOT NULL DEFAULT 'live', user_ip VARCHAR(100), first_name VARCHAR(100), last_name VARCHAR(100), `address` VARCHAR(100), city VARCHAR(100), `state` VARCHAR(100), country VARCHAR(100), zip VARCHAR(100), adddress_confirmed INT(10), gateway VARCHAR(100), transaction_id VARCHAR(100), currency VARCHAR(10), subtotal DECIMAL(16,4) NOT NULL DEFAULT 0, tax DECIMAL(16,4) NOT NULL DEFAULT 0, fees_total DECIMAL(16,4) NOT NULL DEFAULT 0, total DECIMAL(16,4) NOT NULL DEFAULT 0, discount DECIMAL(16,4) NOT NULL DEFAULT 0, discount_code VARCHAR(100), disable_taxes INT(2) NOT NULL DEFAULT 0, due_date DATETIME, completed_date DATETIME, company VARCHAR(100), vat_number VARCHAR(100), vat_rate VARCHAR(100), custom_meta TEXT, is_anonymized INT(2) NOT NULL DEFAULT 0, PRIMARY KEY (post_id), KEY `number` (`number`), KEY invoice_key (invoice_key) ) $charset_collate;"; // Invoice items. $schema['items'] = "CREATE TABLE wp_getpaid_invoice_items ( ID BIGINT(20) NOT NULL AUTO_INCREMENT, post_id BIGINT(20) NOT NULL, item_id BIGINT(20) NOT NULL, item_name TEXT NOT NULL, item_description TEXT NOT NULL, vat_rate FLOAT NOT NULL DEFAULT 0, vat_class VARCHAR(100), tax DECIMAL(16,4) NOT NULL DEFAULT 0, item_price DECIMAL(16,4) NOT NULL DEFAULT 0, custom_price DECIMAL(16,4) NOT NULL DEFAULT 0, quantity DECIMAL(16,4) NOT NULL DEFAULT 1, discount DECIMAL(16,4) NOT NULL DEFAULT 0, subtotal DECIMAL(16,4) NOT NULL DEFAULT 0, price DECIMAL(16,4) NOT NULL DEFAULT 0, meta TEXT, fees TEXT, PRIMARY KEY (ID), KEY item_id (item_id), KEY post_id (post_id) ) $charset_collate;"; // Customers. $schema['customers'] = "CREATE TABLE wp_getpaid_customers ( id BIGINT(20) NOT NULL AUTO_INCREMENT, user_id BIGINT(20) NOT NULL, email VARCHAR(100) NOT NULL, email_cc TEXT, status VARCHAR(100) NOT NULL DEFAULT 'active', purchase_value DECIMAL(18,9) NOT NULL DEFAULT 0, purchase_count BIGINT(20) NOT NULL DEFAULT 0, "; // Add address fields. foreach ( array_keys( getpaid_user_address_fields( true ) ) as $field ) { // Skip id, user_id and email. if ( in_array( $field, array( 'id', 'user_id', 'email', 'purchase_value', 'purchase_count', 'date_created', 'date_modified', 'uuid' ), true ) ) { continue; } $field = sanitize_key( $field );Safe to delete?
If you have uninstalled Payment forms, Buy now buttons, and Invoicing System | GetPaid, this table is generally safe to remove. However, always back up your database first.
Note: Some plugins share tables or are dependencies of other plugins. Verify nothing else depends on this table before dropping it.
How to remove this table
DROP TABLE IF EXISTS `wp_wpinv_subscriptions`;
Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.
Other tables from Payment forms, Buy now buttons, and Invoicing System | GetPaid