WooCommerce Fundamentals

30-45 minIntermediate

WooCommerce is the world's most popular e-commerce plugin, powering 28%+ of all online stores. It transforms WordPress into a full-featured e-commerce platform.

Prerequisites

  • WordPress 5.8+
  • PHP 7.4+ (8.0+ recommended)
  • MySQL 5.7+ / MariaDB 10.3+
  • HTTPS/SSL Certificate
Intermediate Recommended

How WooCommerce Works

Core architecture and data model.

1

Custom Post Types

1

Products (product): The items you sell. Each product is a post with custom fields.

2

Orders (shop_order): Customer transactions. Contains line items, shipping, billing.

3

Coupons (shop_coupon): Discount codes with rules and restrictions.

4

Refunds (shop_order_refund): Linked to parent orders.

2

Product Types

1

Simple: Single product, single price (e.g., a book).

2

Variable: Product with variations like size/color (stored as product_variation CPT).

3

Grouped: Collection of simple products sold together.

4

External/Affiliate: Links to products sold elsewhere.

3

Database Tables

1

wp_posts + wp_postmeta: Products, orders stored as custom post types.

2

wp_woocommerce_order_items: Line items for orders.

3

wp_woocommerce_order_itemmeta: Meta data for line items.

4

wp_wc_product_meta_lookup: Optimized product queries (price, stock).

5

wp_woocommerce_sessions: Cart and session data.

Verification Checklist

  • Check System Status
  • Test Template Override