Lesson 10.3. System Design and Mock Interview

Goal

Design solutions for typical business requests of a store and pass a mock interview.

Key concepts

  • System design for WooCommerce is a choice: a ready plugin, your own code or an external service
  • The answer scheme: requirements → data → flows → risks → how we verify
  • Typical cases: B2B prices, subscriptions, multi-warehouse, a marketplace, a migration to/from Shopify
  • Numbers: products, orders per day, peak load
  • Mock interview: 10 questions of 3 minutes each, self-assessment with a rubric

Diagram

flowchart TB
  R["Requirements<br/>business + numbers"] --> D["Data<br/>where and how we store it"]
  D --> F["Flows<br/>checkout, sync, events"]
  F --> K["Risks<br/>performance, security, updates"]
  K --> V["Verification<br/>tests, monitoring"]

Case: a B2B account for wholesale clients

Requirements: 300 wholesale clients, individual prices on 5,000 SKU, deferred payment, orders from a minimum amount, a daily price sync from the ERP.

A strong answer — step by step:

  1. Data. Prices are not product meta (300 × 5,000 = 1.5 million values), but an own table (customer_group, sku, price) with an index. Clients are price groups, not 300 separate rules.
  2. Catalog prices. Price filters plus the variation cache hash with the customer group. Page cache off for logged-in wholesale clients.
  3. Checkout. A "Deferred payment" method only for the B2B group, status on-hold, the minimum amount through woocommerce_check_cart_items. Tested in block checkout.
  4. Sync. A daily ERP price import through Action Scheduler in batches, an upsert into the table, an error log.
  5. Risks. Wholesale prices leaking to guests through the cache, price filter performance, conflicts with discount plugins.
  6. Verification. Price calculation tests, an E2E wholesale order, monitoring of failed sync jobs.

Mock interview

Set a 3-minute timer for every question. Answer out loud, then score yourself.

  1. Where are orders stored and what is HPOS?
  2. Why can't you write update_post_meta( $product_id, '_price', ... )?
  3. The client moved to block checkout and a field disappeared. What do you do?
  4. How does the Store API differ from the WC REST API?
  5. A static or a dynamic block for the product price, and why?
  6. How do you handle a payment webhook safely?
  7. How do you sync stock with an ERP for 20,000 products?
  8. The checkout page opens in 4 seconds. Where do you start?
  9. Which 4 checks must an AJAX handler that changes an order have?
  10. How do you update WooCommerce on a live store?
ScoreCriterion
0No answer or a wrong answer
1What to do, without explaining why
2Mechanism + solution
3Mechanism + solution + risks or an example from experience

24–30 — ready for a middle interview. 15–23 — repeat the modules with the lowest scores. Below 15 — take the course again with the practice.

Weak and strong answer

Question: Design monthly coffee subscriptions with delivery.

Weak answer. I'll install WooCommerce Subscriptions.

Strong answer. First I clarify the requirements: automatic or manual payment, changing the blend and pauses, the number of subscribers. If automatic payments are needed — a ready subscriptions plugin with a gateway that supports card tokenization, because building recurring payments yourself is a big risk. Own code only for the specifics: choosing next month's blend, syncing with production through a queue. Risks: failed charges and retries, plugin updates, testing renewal dates.

Why the second is stronger: The candidate chooses between "buy" and "build" with arguments and sees the money risks.

Practice

Take the 10-question mock interview above with a timer and count your score. Then design one case of your choice with the scheme: multi-warehouse with reservations or a marketplace with several sellers. Draw the flow diagram in Mermaid.

Interview Questions

Clarify the requirements and the numbers, then data, flows, risks, verification. Name the choice "ready plugin / own code / external service" explicitly and say why.

A ready plugin when the feature is standard and critical for money (subscriptions, payments, taxes) and the plugin is maintained. Your own code when the business is specific and ready solutions need more workarounds than your own code would.

Volumes (products, orders, peaks), the source of truth for the data, integrations, payment and tax requirements, who will maintain the solution, budget and deadlines.

Save your progress

Sign in or create a free account to mark lessons as completed and continue the whole course. You will come back to this lesson.