wp_affiliate_earnings

Static

Stores affiliate earnings data created by this plugin.

Column Definitions

ColumnTypeNullable
🔑idint(11)NO
user_idint(11)NO
order_idint(11)NO
customer_idint(11)NO
discount_ratedecimal(10,2)NO
discountdecimal(10,2)NO
discount_currencyvarchar(255)NO
commission_ratedecimal(10,2)NO
commissiondecimal(10,2)NO
commission_currencyvarchar(255)NO
commenttextNO
creation_datedatetimeNO

CREATE TABLE Statement

CREATE TABLE IF NOT EXISTS `wp_affiliate_earnings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL COMMENT 'Affiliate User Id', `order_id` int(11) NOT NULL COMMENT 'Customer Order ID', `customer_id` int(11) NOT NULL COMMENT 'Customer Id', `discount_rate` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Discount Rate', `discount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Discount Total', `discount_currency` varchar(255) NOT NULL COMMENT 'Currency of Discount total', `commission_rate` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Commission Rate', `commission` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Commission Total', `commission_currency` varchar(255) NOT NULL COMMENT 'Currency of Commission Total', `comment` text NOT NULL, `creation_date` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `order_id` (`order_id`), KEY `user_id` (`user_id`), KEY `customer_id` (`customer_id`) ) ENGINE

Safe to delete?

If you have uninstalled Simple Affiliate for WooCommerce, 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_affiliate_earnings`;

Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.

Other tables from Simple Affiliate for WooCommerce