Auctions for WooCommerceAuctions for WooCommerce
Buy Now
View Demo
  • Getting Started

    • Introduction
    • Quick Start
    • Features
    • Installation
    • First-Time Setup
    • Onboarding Tour
  • Admin Guide

    • Admin Overview
    • Dashboard
    • All Auctions
    • Add / Edit Auction
    • Bids
    • Reports
    • Events
    • Wallet
    • Disputes
    • Blocked Users
    • Fraud Detection
    • Tools (Import / Export)
    • Settings
    • Design Studio
    • Pending Review
    • Audit Log
  • Auction Mechanics

    • Auction Types
    • Bidding Engine
    • Anti-Sniping
    • Bid Increments
    • Reserve & Buy Now
    • Auto-Relist
    • Watchlist
  • Customer Experience

    • Customer Overview
    • My Auctions
    • My Wallet
    • Withdrawal
    • Single Auction Page
    • Notifications
  • Wallet & Payments

    • Wallet System
    • Auto-Charge
    • Stripe Connect
    • Monetization Fees
  • Multi-Vendor & Integrations

    • Multi-Vendor Compatibility
    • Twilio SMS
    • Firebase Push
    • Two-Factor Auth
    • Captcha
    • Social Login
    • Subscription Gate
    • Elementor & Gutenberg
  • Premium Features

    • Smart Features
    • Psychology Triggers
    • Gamification
    • Fraud Detection
    • Compliance
    • Social Sharing
    • Email Notifications
  • Developer

    • REST API
    • Hooks & Filters
    • JS Events
    • Database Schema
    • Shortcodes
    • Options Reference
    • WP-CLI
  • Help

    • Troubleshooting
    • FAQ
    • Glossary
    • Changelog
Support
Buy Now
View Demo
  • Getting Started

    • Introduction
    • Quick Start
    • Features
    • Installation
    • First-Time Setup
    • Onboarding Tour
  • Admin Guide

    • Admin Overview
    • Dashboard
    • All Auctions
    • Add / Edit Auction
    • Bids
    • Reports
    • Events
    • Wallet
    • Disputes
    • Blocked Users
    • Fraud Detection
    • Tools (Import / Export)
    • Settings
    • Design Studio
    • Pending Review
    • Audit Log
  • Auction Mechanics

    • Auction Types
    • Bidding Engine
    • Anti-Sniping
    • Bid Increments
    • Reserve & Buy Now
    • Auto-Relist
    • Watchlist
  • Customer Experience

    • Customer Overview
    • My Auctions
    • My Wallet
    • Withdrawal
    • Single Auction Page
    • Notifications
  • Wallet & Payments

    • Wallet System
    • Auto-Charge
    • Stripe Connect
    • Monetization Fees
  • Multi-Vendor & Integrations

    • Multi-Vendor Compatibility
    • Twilio SMS
    • Firebase Push
    • Two-Factor Auth
    • Captcha
    • Social Login
    • Subscription Gate
    • Elementor & Gutenberg
  • Premium Features

    • Smart Features
    • Psychology Triggers
    • Gamification
    • Fraud Detection
    • Compliance
    • Social Sharing
    • Email Notifications
  • Developer

    • REST API
    • Hooks & Filters
    • JS Events
    • Database Schema
    • Shortcodes
    • Options Reference
    • WP-CLI
  • Help

    • Troubleshooting
    • FAQ
    • Glossary
    • Changelog
Support
  • Getting Started

    • Introduction
    • Quick Start
    • Feature Catalog
    • Installation
    • First-Time Setup
    • Onboarding Tour
  • Admin Guide

    • Admin Overview
    • Dashboard
    • All Auctions
    • Add / Edit Auction
    • Bids
    • Reports
    • Events
    • Wallet (Admin)
    • Disputes
    • Blocked Users
    • Fraud Detection
    • Tools
    • Settings
    • Design Studio
    • Pending Review
    • Audit Log
  • Auction Mechanics

    • Auction Types
    • Bidding Engine
    • Anti-Sniping (Soft Close)
    • Bid Increments
    • Reserve & Buy Now
    • Auto-Relist
    • Watchlist
  • Customer Experience

    • Customer Experience Overview
    • My Auctions
    • My Wallet
    • Withdrawal
    • Single Auction Page
    • Customer Notifications
  • Wallet & Payments

    • Wallet System
    • Wallet Auto-Charge
    • Stripe Connect
    • Monetization
  • Multi-Vendor & Integrations

    • Multi-Vendor Compatibility
    • Twilio SMS
    • Firebase (Push Notifications)
    • Two-Factor Authentication
    • Captcha
    • Social Login
    • Subscription Gate
    • Elementor & Gutenberg
  • Premium Features

    • Smart Features
    • Psychology Triggers
    • Gamification
    • Fraud Detection
    • Compliance
    • Social Sharing
    • Email Notifications
  • Developer

    • REST API
    • Hooks & Filters
    • JavaScript Events
    • Database Schema
    • Shortcodes
    • Options Reference
    • WP-CLI
  • Help

    • Troubleshooting
    • FAQ
    • Glossary
    • Changelog

Database Schema

The plugin creates 16 custom tables plus uses standard WP / WC tables. All prefixed by your $wpdb->prefix (typically wp_).

Schema version: 1.5.0

Table index

TableColumnsIndexesPurpose
wkafw_auctions225Core auction records
wkafw_bids107Every bid placed
wkafw_proxy_bids62Proxy / max-bid storage
wkafw_watchlist42User → auction watch links
wkafw_auction_logs85Lifecycle event log
wkafw_disputes83Buyer-filed disputes
wkafw_events114Event grouping
wkafw_event_lots42Event ↔ auction many-to-many
wkafw_event_registrations52Bidders registered for events
wkafw_messages73Buyer ↔ seller messages
wkafw_notifications82In-app notifications
wkafw_bid_packs115Penny-auction bid tokens
wkafw_auction_seats63Seated-auction paddle assignment
wkafw_vendor_commissions137Multi-vendor revenue split
wkafw_vendor_ratings74Buyer-rated seller scores
wkwc_wallet_transactions104Wallet ledger (submodule)

Key tables in detail

wkafw_auctions

The central table — one row per auction.

ColumnTypeNotes
idBIGINT(20) UNSIGNEDPK
product_idBIGINT(20) UNSIGNEDFK → wp_posts.ID
auction_typeVARCHAR(20)standard / reverse / sealed / proxy / silent / charity / penny / dutch / seated / unique-bid
start_priceDECIMAL(19,4)Opening bid
reserve_priceDECIMAL(19,4)Hidden minimum
buy_now_priceDECIMAL(19,4)BIN price (0 = disabled)
bid_incrementDECIMAL(19,4)Required step amount
increment_typeVARCHAR(20)fixed / variable / percentage
variable_incrementsLONGTEXTJSON tier table
start_date / end_dateDATETIMEAuction window
original_end_dateDATETIMEPre-anti-snipe end (for reporting)
statusVARCHAR(20)scheduled / active / paused / ended / paid / failed / cancelled
anti_snipe_window / anti_snipe_extensionINT(11)Soft-close config
max_extensionINT(11)Cumulative extension cap (0 = unlimited)
total_extensionsINT(11)Counter
current_priceDECIMAL(19,4)Live high bid
bid_countINT(11)Counter
item_conditionVARCHAR(20)new / like_new / used / refurbished / for_parts
created_at / updated_atDATETIMEStandard timestamps

Indexes: id (PK), product_id, status, start_date, end_date

wkafw_bids

Every bid placed.

ColumnTypeNotes
idBIGINT(20) UNSIGNEDPK
auction_idBIGINT(20) UNSIGNEDFK → wkafw_auctions.id
user_idBIGINT(20) UNSIGNEDFK → wp_users.ID
bid_amountDECIMAL(19,4)The amount
bid_typeVARCHAR(20)manual / proxy / absentee / auto
ip_addressVARCHAR(45)IPv4 / IPv6
user_agentVARCHAR(255)Browser UA
is_anonymousTINYINT(1)0 / 1
statusVARCHAR(20)active / retracted / fraudulent / outbid
created_atDATETIMEWhen placed (UTC)

Indexes: id (PK), auction_id, user_id, bid_amount, created_at, status, auction_status_amount (composite)

wkafw_watchlist

ColumnType
idBIGINT(20) UNSIGNED
auction_idBIGINT(20) UNSIGNED
user_idBIGINT(20) UNSIGNED
created_atDATETIME

Unique index: (auction_id, user_id) — one watch per user per auction.

wkafw_proxy_bids

ColumnTypeNotes
idBIGINT(20) UNSIGNEDPK
auction_idBIGINT(20) UNSIGNEDFK
user_idBIGINT(20) UNSIGNEDFK
max_amountDECIMAL(19,4)The user's secret max bid
is_activeTINYINT(1)0 = absentee (pre-bid before auction starts)
created_atDATETIME

wkafw_auction_logs

The general activity log (per-auction events).

ColumnType
idBIGINT(20)
auction_idBIGINT(20)
user_idBIGINT(20)
actionVARCHAR(50) — e.g. bid_placed, started, extended, won
detailsLONGTEXT — JSON payload
ip_addressVARCHAR(45)
user_agentVARCHAR(512)
created_atDATETIME

This is separate from the bid hash-chain (Wkafw_Bid_Audit_Chain) which uses an in-memory + file-backed structure.

wkwc_wallet_transactions

Wallet ledger (provided by submodule).

ColumnTypeNotes
idBIGINT(20)PK
order_idVARCHAR(250)Source order ID (top-up) or null
referenceVARCHAR(100)Unique transaction reference
senderINT(10)For transfers — sender user_id
customerINT(10)The wallet owner
amountVARCHAR(50)(stored as string for currency precision)
transaction_typeVARCHAR(10)cr (credit) / dr (debit)
transaction_dateDATETIME
transaction_statusVARCHAR(10)completed / pending / failed
transaction_noteVARCHAR(250)

Balance is derived from this table — not stored. See Wallet System.

wkafw_vendor_commissions

Multi-vendor revenue split.

ColumnTypeNotes
idBIGINT(20) UNSIGNEDPK
vendor_idBIGINT(20) UNSIGNEDFK → user (the vendor)
auction_idBIGINT(20) UNSIGNEDFK
order_idBIGINT(20) UNSIGNEDFK → WC order
total_amountDECIMAL(19,4)Winning bid amount
commission_rateDECIMAL(6,3)Platform's %
commission_amountDECIMAL(19,4)Platform's earnings
vendor_earningDECIMAL(19,4)Vendor's net
adapter_slugVARCHAR(32)wcfm / dokan / wc_vendors / yith / native
native_row_idBIGINT(20)Cross-reference to multi-vendor plugin's own commission row
statusVARCHAR(20)pending / paid / cancelled
created_at / updated_atDATETIME

Unique index: (auction_id, vendor_id) — one commission per vendor per auction.

Relationships

wp_users (WP)
   ↓ 1:N
wkafw_bids ───► wkafw_auctions ◄─── wkafw_proxy_bids
                     │
                     ├─► wkafw_watchlist
                     ├─► wkafw_auction_logs
                     ├─► wkafw_disputes
                     ├─► wkafw_event_lots ─► wkafw_events
                     ├─► wkafw_messages
                     ├─► wkafw_auction_seats (seated)
                     ├─► wkafw_bid_packs (penny — by user)
                     └─► wkafw_vendor_commissions ─► wp_users (vendor)
                                                    └─► wp_wc_orders (HPOS) or wp_posts

wp_users
   ↓ 1:N
wkwc_wallet_transactions

Query patterns

Count active auctions

SELECT COUNT(*) FROM wp_wkafw_auctions WHERE status = 'active';

User's wallet balance

SELECT
  SUM(CASE WHEN transaction_type='cr' THEN CAST(amount AS DECIMAL(19,4)) ELSE 0 END) -
  SUM(CASE WHEN transaction_type='dr' THEN CAST(amount AS DECIMAL(19,4)) ELSE 0 END)
FROM wp_wkwc_wallet_transactions
WHERE customer = ? AND transaction_status = 'completed';

Top bidders (lifetime)

SELECT u.display_name, COUNT(*) AS bid_count
FROM wp_wkafw_bids b
JOIN wp_users u ON b.user_id = u.ID
WHERE b.status = 'active'
GROUP BY b.user_id
ORDER BY bid_count DESC
LIMIT 10;

Bid history for a specific auction

SELECT b.*, u.display_name
FROM wp_wkafw_bids b
JOIN wp_users u ON b.user_id = u.ID
WHERE b.auction_id = ? AND b.status = 'active'
ORDER BY b.created_at DESC;

Performance

Every plugin query uses indexed columns. Common access patterns are O(log N) on the relevant index.

For very large databases (1M+ bids):

  • Add a composite index on (auction_id, status, created_at) for bid history pagination
  • Partition wkafw_auction_logs by created_at (monthly partitions)
  • Archive old auctions (status paid / failed older than 1 year) to a separate table

The plugin doesn't auto-partition or archive — operator's responsibility.

Migrations

Schema changes are versioned. On plugin upgrade, Wkafw_Installer::maybe_migrate_db() checks the stored version against the code version and runs incremental migrations.

Stored optionEffect
wkafw_db_versionCurrent schema version
wkafw_db_migrations_failedList of failed migrations (for retry)

Manual migration: Tools → Database → Re-run migrations (Tools →).

HPOS

Order data is queried from:

SettingTables used
HPOS activewp_wc_orders, wp_wc_orders_meta
HPOS inactive (legacy)wp_posts (post_type=shop_order) + wp_postmeta

The plugin auto-detects via \Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled().

Backup recommendations

  • Daily: full DB dump including all wkafw_* and wkwc_wallet_* tables
  • Hourly: wkafw_bids + wkafw_auction_logs (for audit recovery)
  • Real-time: replicate to a read-only standby (for high-availability sites)

The plugin's data is not recoverable from WP exports — use mysqldump or your hosting provider's backup tool.

See also

  • Hooks & Filters — actions / filters reference
  • Options Reference — all 132 plugin options
  • Tools → Database — admin migration / repair tools
Prev
JavaScript Events
Next
Shortcodes