| 开发者 | mralaminahamed |
|---|---|
| 更新时间 | 2026年8月10日 02:54 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[warranty_cart] shortcode, in a grid or a list, for stores that would rather sell cover separately./wp-content/plugins/warranty-cart directory, or install the plugin through the WordPress plugins screen directly.[warranty_cart] shortcode to display warranty products on any page.[warranty_cart] on a page to sell cover separately as well.Open the warranty product, go to the Warranty tab, and set Offer alongside:
Yes, and you do not need to sell cover at all to use the plugin this way. On the warranty product, tick Included free in the Warranty tab and set Offer alongside to the products it applies to. Nobody is asked to buy it. The product page states the cover instead of offering it, and when an order completes a warranty record is written for every product in it that the rule covers. From there it behaves like any other policy: the customer sees it under My Account → Warranties, can file a claim against it, and gets the expiry reminders. This is how to record a guarantee you already give — "twelve months, parts and labour" — so that both sides can see it and a claim against it goes somewhere other than an inbox. The price fields stop applying while it is ticked, and the plan does not need a price at all. Cover that came free is recorded as such, so your warranty list still tells what you sold from what you gave away.
Yes. On the warranty product, set Price to Percentage of the covered product and enter the percentage — 10%, say. Optional Minimum and Maximum keep it sensible at both ends: 10% of a £40 kettle is not worth administering, and 10% of a £5,000 television asks for more than anybody will pay.
A fixed price works for a catalogue where everything costs about the same, and breaks immediately where it does not — £29 of cover is most of the value of a £40 item and a rounding error on a £2,000 one.
The price is worked out against the product being covered at the moment cover is added to the cart, and held there: if you reprice the product afterwards, a customer's existing cart keeps the figure they were quoted. Rounding follows your store's own currency settings.
On the [warranty_cart] selector page there is no product to take a percentage of, so the warranty's own price is shown, with a note saying what the rule is.
Yes. Customers see their cover under My Account → Warranties and can file a claim against anything still active, describing what has gone wrong. Claims arrive on the Claims screen in the admin, where you move them through Pending, In progress, Approved, Rejected and Resolved — and the customer is emailed at every change, with whatever note you wrote.
Yes. Put the [warranty_claim] shortcode on a page and link to it from your order emails.
The customer enters the order number from their confirmation email and the address they ordered with — the same pair WooCommerce's own order tracking asks for — and sees the cover on that order, with a button to claim against anything still active. The shop's replies are emailed to that address.
An order that belongs to a registered account is never reachable this way; those customers are sent to My Account → Warranties instead, where their claim history already is. A wrong order number and a wrong email address are refused with the same message, so the page cannot be used to find out which order numbers exist, and repeated failures from one address are made to wait.
Turn it off under Warranty Cart → Settings → After the sale → Claims if you do not take guest orders.
Yes. Settings → Notifications → Scheduled emails has a switch each for the reminder before cover ends and the notice after it has ended. They used to share the single "enable email notifications" setting with claim replies, so a shop that wanted the nudge and not the obituary had to silence everything — including the message telling a customer their claim had been approved. Turning the expiry notice off stops the email and nothing else. The warranty still expires, because a claim must not be accepted against cover that ended months ago.
Turn the field off under Settings → After the sale → Customer account → Serial numbers. A field asking for the serial number of a shirt is a question nobody can answer, and the same panel sets how many warranties a customer sees per page.
name, description, price and type are required; type is either main_warranty or additional_service. duration, duration_unit (days, months or years), sku and coverage_details are optional.
A plan imported without a duration falls back to the default term under Settings → Selling cover, so a catalogue of one, two and three-year cover needs the duration columns to arrive as three different plans.
Imported products are filed under the category named in Settings → Import, and that category is created if it does not exist — so a typo there quietly adds a category to your catalogue.
The import reports how many rows it could not use and why, with line numbers.
Under Warranty Cart → Settings → After the sale → Claims: the largest file a customer may attach, how many files one claim carries, and whether evidence is required at all. These used to share one number with the CSV importer, filed under Import and labelled as an import setting — so tightening it to keep imports small also stopped customers photographing a fault. They are separate now. A store that had changed the old setting keeps that value for claims until it sets its own.
Yes. Warranty Cart → Reports now opens with what cover costs to honour: the loss ratio, what cover sold for, what claims cost, and how much cover is still running and therefore still owed. The loss ratio is claim cost as a share of what cover earned in the same period, counting claims by the date they were decided rather than filed — a claim settled in May costs the shop in May, not in the month it arrived. Refunded cover is left out of both halves, so money you gave back does not flatter the figure. Where a cost was not recorded on every decided claim, the panel says so and says the real figure is higher. A ratio built from a fifth of your decisions reads as though it covered all of them, and that is the number that gets a shop into trouble. Record the cost when you resolve a claim and the figure becomes worth acting on. All of it exports with the rest of the report.
Yes. Open the claim under Warranty Cart → Claims and use the Correspondence box. A message marked Send to the customer is emailed to them and appears with the claim on their account page — or, for a guest, at the order lookup they filed it from. A message marked Internal note is stored with the claim and never leaves the shop. This is separate from the decision below it on purpose: a question is not a status change, so asking one does not tell the customer their claim has been approved or rejected. Replies come back by email rather than into the claim. A customer cannot yet write into the thread.
Yes. Each warranty has its own page under My Account → Warranties, with a Serial number field on it. It is asked for after the purchase rather than at checkout, because the customer does not have the item in front of them when they buy the cover — the number is on a plate they can only read once it has arrived. Serials are stored and matched with the spaces removed and in upper case, so a customer copying "gd 7741-x" off a label finds the cover the shop recorded as "GD7741-X". You can then find a policy from the item itself: search the serial on Warranty Cart → Records, which now matches serials as well as customers, products and SKUs. That is the search you actually need when somebody arrives holding a broken appliance and no order number. A serial already recorded against another warranty is allowed and flagged, not refused — replacing a unit under warranty legitimately puts the same number on a second policy.
Yes. A Renew button appears on their account page as cover approaches expiry, and for a grace period afterwards; both windows are settings, 30 days each by default. The expiry reminder email links straight to it. Renewing goes through the cart, so it produces a real order and you are paid for it. Renewing early adds the new term to the time already left rather than restarting the clock — a customer with two months remaining who renews for a year ends up with fourteen months, not twelve. Every warranty renewal is recorded against the policy: when it happened, how far the term moved, what it cost and which order paid for it.
Yes. Under Warranty Cart → Settings → Selling cover, choose where the offer appears: the product page, the cart, both, or nowhere. Product page only is the default. The product page catches the customer while they are still deciding what to buy; the cart catches the ones who skipped past it. An extended warranty upsell is pure margin either way — there is no stock to buy and nothing to ship.
No. Warranty Cart sells product warranty cover and runs what follows it — claims, renewals, expiry and reminders. Whether a claim ends in a repair, a replacement or a refund is your decision to make; you record it as the claim's resolution and the customer is emailed it. What the plugin does not do is issue return authorisations, print return labels or restock inventory, so if you need a returns workflow, an RMA plugin is the right tool and the two sit alongside each other.
Yes, that is what checkout fields are for. On the Checkout Fields screen you define what a warranty needs registering — serial number, model, install date, engineer's name — and the answers are stored against the policy, so the product registration details are on the record when a claim arrives.
Yes. Naming a variable product under Offer alongside covers every one of its variations, so you set the rule once rather than per size or colour.
The offer renders through WooCommerce's own template system and is styled in relative units, so it takes your theme's type scale rather than fighting it. Every template can be overridden from your theme in the usual way — copy it into yourtheme/warranty-cart/.
Use the [warranty_cart] shortcode on any page or post. The shortcode accepts one attribute, layout:
[warranty_cart layout="grid"] or [warranty_cart layout="list"]
To scope which products show (category, custom meta, etc.) use the warranty_cart_shortcode_products_query filter.
Whatever your store already takes. Warranty records are created when a WooCommerce order reaches Completed, so any gateway WooCommerce supports works — Stripe, PayPal, Square, Mollie, WooPayments, bank transfer, cash on delivery. The plugin handles no payment itself and has no gateway-specific code. Warranty Cart → Settings → Payments lists every gateway on your store and what each one supports.
No. Warranties are created when an order is marked complete, which WooCommerce does whatever took the payment — card, PayPal, bank transfer, cash on delivery. Settings → Payments lists every gateway on your store and what each one supports.
After installation, click the top-level Warranty Cart menu in your WordPress admin sidebar (shield icon). This provides access to all warranty management features: dashboard, warranty product catalog, warranty records, orders, reports, settings, and tools.
The plugin automatically generates PDF certificates for purchased warranties using DomPDF. They are attached to the order completion email and can be re-downloaded from Warranty Cart → Orders. PDFs are stored under wp-content/uploads/warranties/. Toggle the feature on or off under Warranty Cart → Settings → Enable PDF certificates.
When a WooCommerce order containing one or more warranty products reaches the Completed status. That is a WooCommerce core event, so it fires whatever took the payment. Each warranty product in the order produces a row in wp_warranty_cart_warranties with status active and an expiration_date calculated from the duration.
Two daily WP-Cron events handle the lifecycle:
warranty_cart_check_expirations — marks active warranties as expired on or after their expiration_date and sends the Warranty Expired email.warranty_cart_send_reminders — emails customers N days before expiration (default 30, filterable via the warranty_cart_reminder_days filter).wp-cron.php) and add define('DISABLE_WP_CRON', true); to wp-config.php.
Go to Warranty Cart → Tools, download the sample CSV, fill it in, and upload via the Import CSV card. Each row creates a WooCommerce product with the Warranty tab pre-filled.
Common fixes:
wp_mail() is unreliable on default WordPress installs. Install an SMTP plugin (WP Mail SMTP, FluentSMTP) and connect a real transactional provider.gd or imagick extension and ~128 MB memory.wp-content/uploads/warranties/ exists and is writable by your web server user.type column it requires, so every imported product became an additional service and appeared nowhere on the storefront; it also discarded the warranty term, and reported rows it had skipped as successes