Linux 软件免费装
Banner图

Dynamic QR Codes for WooCommerce – Coupons & Scan Tracking

开发者 itkagency
更新时间 2026年11月5日 19:16
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce qr code coupon dynamic qr code qr code generator

下载

1.0.0 2.0.0

详情介绍:

Dynamic QR Codes for WooCommerce turns a flyer, a poster, a shelf label or a packaging insert into a one-scan path to checkout. The customer scans, the product lands in their cart, your coupon is already applied, and they arrive on the cart page ready to pay. Nothing to search for, no code to type. The codes are dynamic. A printed code holds its own address on your store, not the offer itself, so you can change what a code does after it's printed. When the promotion ends, swap the coupon or retire the code. The stickers already out there keep working. What happens when a customer scans
  1. The exact product, or a specific variation, is added to their cart
  2. Your coupon is applied automatically
  3. They land on the cart page, ready to check out
Change a code after printing Creating a code takes under a minute
  1. On All QR Codes, click Create QR code and pick a product (or open any product and find its QR codes box)
  2. Pick an existing WooCommerce coupon (or none, for a plain add-to-cart code). The preview of your code is shown as you go
  3. Click Create QR code
  4. From the new code's row, Download it as PNG or SVG for your printer or designer, or Add to Media Library if you want to use the image in posts, emails or a page builder
Scan numbers you can trust Where dynamic QR codes work best Key features Free version The free version includes 1 QR code per product (or 1 per variation for variable products). Each one can be edited or retired at any time, downloaded as PNG or SVG, and tracked with real scan counts. Paid upgrade A paid upgrade is available separately for stores that want more. It adds: The free version is fully functional on its own; the upgrade is optional. Security A QR code leads to your own store and is resolved there at scan time. New codes carry only a short random identifier. Codes printed before version 2.0 carry the product ID, variation ID and coupon code as plain query parameters, and keep doing so because they're already printed. WooCommerce's own coupon rules (usage limits, expiry, minimum spend, product restrictions) control redemption either way. Scanning a code is equivalent to clicking a link with the coupon pre-applied.

安装:

  1. Upload the plugin folder to /wp-content/plugins/ or install it from the WordPress dashboard.
  2. Activate the plugin.
  3. WooCommerce must be active. The plugin will not activate without it.
  4. Open the plugin's Settings page to set your appearance defaults.
  5. Go to QR Codes → All QR Codes, click Create QR code and pick a product. Its QR codes box opens, ready to create your first code.
Upgrading from 1.x The database is updated automatically the first time an administrator opens the dashboard after the update. Until then, and while it runs, codes already in print keep working. Back up your database before any major update.

屏幕截图:

  • A product's QR codes box: live preview, one-step "Create QR code", and the saved codes with Edit and Download
  • All QR Codes with the "Get started" panel a new store sees first: create a code, download it, scan it
  • The cart after a scan: product added, coupon applied

升级注意事项:

2.0.0 Now named Dynamic QR Codes. Printed codes keep working and become editable. A one-time database update runs in the admin, never on customer visits; back up first. Developers: hooks and the REST API changed (codes keyed by code ID), see the changelog. Codes made in 2.0 don't scan on 1.x.

常见问题:

What makes a QR code "dynamic"?

The printed code holds an address on your store, not the offer itself. What that address does (which coupon it applies, or whether the code is still active) is looked up when someone scans it. So you can change a code after it's printed, and every printed copy follows.

Can I change the coupon after the code is printed?

Yes. Edit the code and pick another coupon. The next scan applies the new one. Past scans stay in your history as they were.

I changed my design (new colours or logo). Can my existing codes use it?

Yes. Edit a code and click Use the current site design, or select several codes on All QR Codes and choose Apply current site design from the bulk actions. A code's address never changes, so copies already printed keep working; new downloads and prints use the new look. An image you added to the Media Library earlier is marked "Image out of date" until you re-save it.

What happens when I retire a code?

Scanning it no longer adds anything to the cart or applies a coupon. The customer is sent to the product page, or to your shop if the product no longer exists. The code keeps its scan history, and you can make it active again later.

I printed codes with version 1.x. Do they still work?

Yes. Printed codes are permanent, so every code the plugin has generated keeps scanning. Codes from 1.x keep their original link, and when you edit one (for example, to change its coupon), the edit applies to the stickers already printed.

Can I go back to version 1.x?

Yes, your data stays intact and 1.x codes keep scanning. While 1.x is installed, codes you created in 2.0 open your shop instead of their product (short links, /q/…, show "page not found"), and coupon changes you made in 2.0 don't reach stickers printed with 1.x. When you update to 2.0 again, open the dashboard once (or run wp qrcw upgrade) to finish the database update; until then, codes created in 2.0 open your shop.

What are short links (/q/…)?

An optional setting under Settings → Links & tracking → Short links. When it's on, new codes point to yourstore.com/q/k7m2xa instead of yourstore.com/?qrcw=k7m2xa. When your store sits at the root of its domain, the QR stores the address in capitals (YOURSTORE.COM/Q/K7M2XA): QR codes pack capital letters and digits more tightly, so the code has fewer, larger squares and scans more easily when printed small. Some phone cameras show the address in capitals before you tap it; it opens the same page. In the admin you always see it in lowercase. Short links need any permalink setting except Plain (under Settings → Permalinks), and the setting can't be turned on if /q/ is already used by a page or another plugin. Changing the setting only affects codes you create afterwards: existing codes keep their address, and every address keeps working. If you later switch permalinks to Plain, a warning tells you how many printed codes use short links, because they stop working until you choose any other setting.

How do I find which printed code is which?

Every code's address ends in a six-character identifier, such as k7m2xa in yourstore.com/?qrcw=k7m2xa. Read it with any QR app (or off the print, if you printed the address under the code) and search for it on QR Codes → All QR Codes: the search box matches identifiers as well as labels, coupons and products. Don't open the link itself if you don't want to count a scan or fill your own cart.

My scans aren't counted, or the cart stays empty. Could caching be the cause?

Every scan response tells caches not to store it, which page-cache plugins honour. If your host, CDN or server (Varnish, Nginx, LiteSpeed, Cloudflare page rules) caches pages before WordPress runs, exclude URLs containing ?qrcw= and, if you use short links, paths starting with /q/. The page a scan opens (your shop or a product page) gets a one-off qrcw_n parameter, so a page cache always serves it fresh, with the scan's message ("Coupon applied", "Out of stock") and its analytics event. The parameter is removed from the address bar as the page opens; if it still shows in your analytics, exclude it there.

Why did my test scan land on the shop page?

Most likely the code wasn't created yet. The preview in the QR codes box isn't a live code until you click Create QR code. Create it, then scan it again from its row.

What is the difference between Download and Add to Media Library?

Download renders the PNG or SVG in your browser and saves it to your computer. Nothing is stored on the server except the code itself. Add to Media Library also stores the image as a regular WordPress media file, so you can insert it into posts, emails or a page builder. Both act on a code you've already created, from its row. If you change the code's design or caption later, its Media Library image is marked "Image out of date" until you re-save it. Images you added to the Media Library through the plugin are deleted along with their code; Delete all QR codes and deleting the plugin remove them too. Files you uploaded yourself are never touched.

Why are some visits not counted as scans?

Messaging apps and social networks fetch a link to build a preview the moment it's shared, and search engines and link checkers visit links too. These requests are recognised by their browser signature and request type, recorded as bots, and left out of your counts. They never add products to a cart or apply coupons. Email security scanners that present themselves as ordinary browsers can't be told apart and may still be counted.

What is the difference between scans and link clicks?

A scan comes from the printed QR code. A link click comes from the link you copied with Copy link and shared elsewhere. The copied link carries a small marker, so clicks on it are counted separately and don't inflate the numbers for your printed codes. On All QR Codes and in a product's QR codes box, Visits adds the two together and shows the split under the number; Analytics keeps them apart.

What does "unique scans" mean?

Unique scans count each visitor once per code per day, based on a hashed IP address. Several people behind one shared network (an office, event Wi-Fi) may count as one.

Does this work with variable products?

Yes. A code for a specific variation adds that exact variation to the cart. A code without a variation takes the customer to the product page to choose, and the coupon is applied once they add the product to the cart.

Can one QR code add several products?

Yes, with your plan. A bundle code holds up to 20 products (each with a quantity, variations included) and an optional coupon. A scan puts all of them in the cart, applies the coupon once, and opens the cart. If a product is out of stock or no longer sold at that moment, it's skipped and named in a notice, and the rest still go in. Create one on All QR Codes with Create QR code → Bundle. You can change the list later and printed copies follow it. Bundle codes keep working on the free version. In Analytics their scans and sales show on the QR Codes, Campaigns and Overview reports; the Products report doesn't split a bundle's sales across its products.

How do I put a reorder or next-purchase code in parcels?

With your plan, open the order and use the QR codes for this order box. It lists the active codes of each product in the order (a scan puts that product back in the cart), and the codes you marked Show on orders, such as a link code to your shop with a "5% off your next order" coupon. Mark a code from its Edit dialog, or with the Show on orders bulk action on All QR Codes. Tick the codes you want and click Print selected for one sheet, or print or download each code on its own. If a product has no active code, Create a parcel code makes one labelled "{product} — parcel insert", so Analytics shows how much reorder revenue your parcels bring. Nothing is created per order and no order details go into a code. Retired and blank codes are never listed.

Can the same QR code be used many times?

Yes. The code has no expiry of its own. The coupon's WooCommerce rules (usage limit per user, total usage limit, expiry date) limit redemptions. To stop a code entirely, retire it.

Is the coupon code visible to the customer?

Not in the link of a new code: it only contains a short identifier. The coupon is shown in the cart once it's applied, as with any WooCommerce coupon. Codes printed before 2.0 carry the coupon code in the link, where it's visible in the browser's address bar.

Do QR orders show up in WooCommerce Order Attribution and Google Analytics?

Yes. Every scan adds UTM tags to the page it opens: utm_source=qr, utm_medium=print (link when the code's link was shared rather than scanned), utm_campaign with the campaign's name when the code is in one, and utm_content naming the code (its label, or its product's name when it has none, plus its address, set when the code is created). WooCommerce's Order Attribution reads them, so the order's Origin shows Source: qr instead of "Direct", and Google Analytics reports the visit under qr / print. A scan counts as the latest visit, so it replaces an earlier ad click in the same session. Change the values or turn tagging off under Settings → Links & tracking. A value already typed into a code's destination always wins. If you use Google Tag Manager, the first page a scan opens on your site also pushes one qr_scan event to the dataLayer, with the code, its label, campaign, kind and whether it was scanned or opened as a link. The plugin never loads Google Tag Manager or Analytics itself; your own tag setup and cookie consent decide what is sent. Developers can change or drop the event with the qrcw_scan_datalayer filter.

Does the plugin call any external services?

QR rendering is fully offline. QR images are rendered entirely in your browser and the codes themselves are never sent off-site. The only bundled third-party rendering code is the library qr-code-styling (v5.3.1, MIT licence, https://github.com/kozakdenys/qr-code-styling). Its source is available there; an unminified copy of the plugin's own scripts ships alongside the minified ones. Scans are handled on your own server. Scan logging, bot and link-preview detection, and the link-click marker all run locally. No third-party service is involved. The UTM tags and the optional qr_scan dataLayer event only label the visit for tools you already run on your site (WooCommerce Order Attribution, your own Google Tag Manager); the plugin sends nothing to Google itself. Licensing and optional analytics via Freemius. The plugin uses the Freemius platform (https://freemius.com) for software licensing, updates, and optional usage analytics. Nothing is sent to Freemius unless you opt in on the activation screen; you can skip the opt-in and the plugin stays fully functional. If you do opt in, your site URL, the administrator email address and name, and environment details (WordPress, PHP and WooCommerce versions, active plugins and theme, and site language) are shared with Freemius for support, compatibility checks, and product improvement. The paid upgrade additionally contacts Freemius to validate your licence and deliver its updates. See the Freemius Privacy Policy (https://freemius.com/privacy/) and Terms of Service (https://freemius.com/terms/).

What does the plugin store about the people who scan?

Each scan is logged in your own database: which code was scanned, the product and coupon involved, the result, the date and time, the WordPress user ID if the visitor was logged in, a one-way hash of the IP address (the raw IP is never saved), and the browser's user-agent string. Whether a request came from a bot, and whether it came from a copied link, is worked out on your server from the request itself; no additional personal data is collected for it. The scan log powers the counts in your dashboard, is covered by the WordPress personal-data export and erase tools, and is deleted when the plugin is uninstalled. After a scan, a short-lived cookie (qrcw_scan, 10 minutes, holding only the code's number and kind) lets the next page send the qr_scan event; it is removed as soon as that page loads, and is not set when the event is switched off.

Can a QR code send customers to another website?

Only if a store administrator sets it up. With the paid upgrade, a link code (All QR Codes → Create QR code → For a link, or a campaign's QR codes) can point at any page, including one on another site. When a customer scans such a code, their browser is redirected there, with any UTM tags you configured added to the link. The plugin sends nothing else to that site, and coupons can't be attached to codes that point off-site. Only store managers (users who can manage WooCommerce) can point a code at another website. Codes created in the free version always lead to your own store.

Does the plugin log anything for troubleshooting?

Only when you ask it to. Under Settings → Cleanup → Diagnostics there is a diagnostic logging switch that is off by default. Turn it on (usually only while reproducing an issue for support) and the plugin records what it is doing, such as QR scans and coupon application, using WooCommerce's own logging system. The entries appear under WooCommerce → Status → Logs (source qrcw), where you can read, download or delete them. These logs stay on your server; nothing is sent anywhere. They contain operational identifiers only, such as product, QR-code and scan IDs, coupon codes and scan outcomes, and never customer names, emails or IP addresses. Leave the switch off during normal use; turning it off stops new entries, and you can delete existing logs from the WooCommerce log viewer at any time.

Is there a developer API?

Yes. Other plugins and themes can read and change QR codes through documented PHP functions: qrcw_get_code(), qrcw_get_code_by_slug(), qrcw_get_code_url(), qrcw_create_code(), qrcw_update_code() and qrcw_get_code_stats(). They validate input the same way the admin screens do and return WP_Error on failure. Actions such as qrcw_code_created, qrcw_code_updated, qrcw_code_status_changed and qrcw_scan_recorded let you react to changes and scans. Use these, not the plugin's internal classes, which can change between releases. From version 2.0, a public function or hook that is renamed or removed keeps working for at least one more minor release, with a deprecation notice in debug mode, and the change is listed in the changelog. Hosts and agencies can run wp qrcw status to check the plugin version and whether its database update has run, the database version, the last failed upgrade step, short links and how many codes are active, retired or unassigned, and wp qrcw upgrade to run the database update right after a deploy (it exits with an error code if a step fails).

Is there a paid version?

Yes. The free plugin is complete and self-contained. A separately available paid upgrade adds unlimited codes per product, editing of a code's product, destination, fallback page, campaign and design after printing, link codes to any page or site, campaigns with UTM tagging, bulk creation, Scan a code with blank codes to assign later, bundle codes, parcel inserts from the order screen, visual QR design (dot and corner styles, gradients, logos, frames), saved print layouts, a quick coupon creator, and analytics with order-level conversion and revenue attribution.

更新日志:

2.0.0 New name: QR Coupon for WooCommerce is now Dynamic QR Codes for WooCommerce. Same plugin, same settings, same data. Highlights Also new or changed Fixes Developers 1.0.0