k-sync
Back to blog

Shopify discount codes: replacing WooCommerce coupons after migration (2026)

How to recreate WooCommerce coupon codes in Shopify — discount types, percentage vs fixed, minimum order, product restrictions, buy X get Y, automatic discounts, and migrating coupon data.

·By k-sync
4 min read · 702 words

WooCommerce coupons and Shopify discount codes cover similar ground but have meaningful structural differences. Most WooCommerce coupons can be directly recreated in Shopify. Some advanced coupon configurations (product-level restrictions, custom coupon logic) require Shopify Functions or third-party apps. Neither platform migrates coupon data automatically — coupons must be recreated manually or via API after migration.

WooCommerce coupon types and Shopify equivalents

WooCommerce coupon typeShopify equivalent
Percentage discount (e.g. 20% off)Percentage discount code
Fixed cart discount (e.g. £10 off)Fixed amount discount code
Fixed product discount (e.g. £5 off specific product)Fixed amount discount with product restriction
Free shipping couponFree shipping discount code
Buy X get Y (requires Smart Coupons plugin)Buy X Get Y discount (built-in Shopify)
Minimum spend requirementMinimum purchase amount condition on discount
Maximum discount amountNot directly available — use fixed amount instead or Shopify Functions
Usage limit per couponTotal usage limit on discount code
Usage limit per customerOne use per customer option on discount
Expiry dateEnd date on discount
Email-restricted couponNot native — use Shopify Functions or customer segment + automatic discount

Creating discount codes in Shopify

Shopify Admin → Discounts → Create discount. Four main discount types:

Amount off products

Fixed amount (£10 off) or percentage (20% off) applied to specific products or collections, or all products. Add minimum purchase amount, usage limits, and customer eligibility.

Buy X get Y

Customer buys a quantity of product(s) and receives a discount on another quantity. BOGO (buy one get one free) is a common case. Shopify's Buy X Get Y handles this natively — it was a paid plugin requirement in WooCommerce.

Amount off order

Discount applied to the total cart. Same options as above but order-level rather than product-level.

Free shipping

Free shipping for the order, optionally limited by minimum purchase, specific countries, or maximum shipping rate covered.

Automatic discounts

Shopify's automatic discounts apply without a coupon code — customers see the discount applied when cart conditions are met. Use automatic discounts for:

Automatic discounts and discount codes cannot be combined by default. One discount applies per checkout (the best available discount wins). For combining discounts, Shopify Plus with Shopify Functions is required.

Migrating WooCommerce coupon codes

WooCommerce coupon data is not migrated by k-sync (it's separate from product data). To recreate your coupon library in Shopify:

  1. Export WooCommerce coupons: WooCommerce → Marketing → Coupons → Export (or WP All Export)
  2. Identify active coupons: those with usage remaining, no expiry or future expiry, and redemption history indicating they're in circulation
  3. Recreate in Shopify manually (for small coupon sets) or via Shopify Admin API bulk create
  4. For large coupon sets (email marketing codes, affiliate codes): use the Shopify Admin API's POST /admin/api/2024-01/price_rules.json and POST /admin/api/2024-01/discount_codes.json to bulk-create

Discount code bulk creation via API

For affiliates, influencers, or large promotional code sets, use the Shopify Admin API:

// 1. Create a price rule (the discount logic)
POST /admin/api/2024-01/price_rules.json
{
  "price_rule": {
    "title": "AFFILIATE20",
    "target_type": "line_item",
    "target_selection": "all",
    "allocation_method": "across",
    "value_type": "percentage",
    "value": "-20.0",
    "customer_selection": "all",
    "starts_at": "2026-01-01T00:00:00Z",
    "usage_limit": 1000
  }
}

// 2. Add a discount code to the price rule
POST /admin/api/2024-01/price_rules/{id}/discount_codes.json
{
  "discount_code": { "code": "AFFILIATE20" }
}

Advanced discount logic

For WooCommerce coupon configurations that Shopify can't replicate natively (tiered discounts, stackable coupons, account-level discounts), options include:

Post-migration discount checklist

Migrate your store with k-sync

Connect your WooCommerce store, validate your products, and push to Shopify in minutes. Free for up to 50 products.

Get started free

Related reading

Browse all migration guides