---
title: "WooCommerce"
description: "Install the Surebright Product Protection Plan plugin for WordPress, see what shoppers get, set up the four order webhooks, and know what happens when you refund or delete an order."
---

SureBright for WooCommerce is a WordPress plugin, **Surebright Product Protection Plan**, plus four order webhooks that you create in WooCommerce. The plugin shows the offer on your product and cart pages and adds the chosen plan to the cart. The webhooks are what turn the plans you sell into contracts. Use this page when you install the plugin or set up the webhooks with your SureBright contact.

<Note>
  **Availability.** The WooCommerce plugin is in limited release. It is installed with help from your SureBright contact rather than from the WordPress plugin directory. Talk to us before planning a launch on WooCommerce.
</Note>

## What you get on WooCommerce

- A protection offer on product pages and on the cart page.
- The chosen plan added to the WooCommerce cart and bought through checkout with the rest of the order.
- A **Merchant Portal** page in your WordPress admin that signs you in to SureBright without separate credentials.
- A contract for each plan sold, kept in step when you refund, delete or restore the order.

## What you need to do

| Step | What you do |
|---|---|
| 1 | Install and activate the plugin, with help from your SureBright contact. |
| 2 | Open the merchant portal from WordPress and complete the onboarding journey. |
| 3 | Check that your products have a category. |
| 4 | Create four order webhooks in WooCommerce. Until they exist, plans sold on your store do not become contracts. |

## Requirements

| | |
|---|---|
| WordPress | 5.6 or later |
| PHP | 7.2 or later |
| WooCommerce | tested up to 5.6.0 |
| Plugin version | 3.7.1 |

## Install the plugin

<Steps>
  <Step title="Install and activate">
    Install the **Surebright Product Protection Plan** plugin in WordPress and activate it. Activation registers your store with SureBright.
  </Step>
  <Step title="Open the merchant portal">
    The plugin adds a **Merchant Portal** page to the WordPress admin menu with a **Login** button. It opens the SureBright [merchant portal](/merchant-portal/overview) signed in as your store, so you do not need separate credentials. Complete the onboarding journey there.
  </Step>
  <Step title="Review product categories">
    Offers are based on the SureBright category on each product. Check [Products](/merchant-portal/products) and set the category on anything that is missing one.
  </Step>
  <Step title="Set up the order webhooks">
    Create the four webhooks described under [Set up the four order webhooks](#set-up-the-four-order-webhooks). Until they exist, plans sold on your store do not become contracts.
  </Step>
</Steps>

During onboarding SureBright creates the plan products in your WooCommerce catalogue, one per category you sell, so that a plan can be added to the cart and paid for like any other item. Leave these products as they are.

## What shoppers see on product and cart pages

**Product pages.** Above the **Add to cart** button the shopper sees an **Add 2-Year Warranty** block with one tile per available term showing the added years and the price, with **Powered By SureBright** underneath. The information icon opens a popup headed **Don't want to spend extra on this product for the next few years?**, with the list of what the plan covers under **Your Warranty Plan Provides**, an **Add Warranty** button, **No Thanks**, and a link to the plan's terms.

**Cart page.** Each cart item that qualifies gets an **Add Warranty for $price** link next to its name. Clicking it opens the **Add Extended Warranty** popup with the available plans and **Add Protection** / **No Thanks** buttons.

Choosing a plan adds it to the WooCommerce cart without reloading the page. The plan then goes through checkout with the rest of the order.

## Set up the four order webhooks

Create the webhooks in **WooCommerce > Settings > Advanced > Webhooks**, one per topic. For each one:

- Choose the topic from the table.
- Enter the delivery URL: the host your SureBright contact gives you, followed by the path from the table.
- Enter the **Secret** your SureBright contact provides, exactly as given. With any other secret, plans do not become contracts.
- Set it to **Active** and to the WP REST API v3 payload.

| Topic | Delivery URL path | What it does for you |
|---|---|---|
| **Order created** (`order.created`) | `/partner/api/v1/webhook/woocommerce/order/create` | The plans on a new order become contracts, each for the product it covers. |
| **Order updated** (`order.updated`) | `/partner/api/v1/webhook/woocommerce/order/update` | Refunded plan quantities cancel the matching contracts, and changed customer details reach the contract. |
| **Order deleted** (`order.deleted`) | `/partner/api/v1/webhook/woocommerce/order/delete` | The order's contracts are cancelled. |
| **Order restored** (`order.restored`) | `/partner/api/v1/webhook/woocommerce/order/restore` | Contracts cancelled by the delete are reinstated. |

<Warning>
WooCommerce disables a webhook after repeated delivery failures. If plans stop turning into contracts, open **WooCommerce > Settings > Advanced > Webhooks** and check that all four are still **Active**.
</Warning>

Two things to know once the webhooks are running:

- **Keep your site URL the same.** SureBright recognises your store by the URL of your WordPress site, which must match the store SureBright registered. If you move domains, tell your SureBright contact before the webhooks start failing.
- **A successful delivery is not always a contract.** If an order is missing something SureBright needs (for example a line price that is not a number), WooCommerce still shows the delivery as successful. SureBright reviews the gap itself.

## Questions about the webhooks

| Question | Answer |
|---|---|
| Which orders become contracts? | Orders whose status is **Processing** or **Completed**. An order that is **Pending payment**, **On hold** or **Failed** is noted, and its contracts are created when the order moves to **Processing** or **Completed**. That move arrives through **Order updated**, so keep that webhook on even if most of your orders are created already paid. |
| Do partial refunds count? | Yes. A refund on an order arrives through **Order updated**, and the refunded plan quantities are cancelled. |
| Can a repeated delivery create a second contract? | No. WooCommerce sometimes delivers the same webhook twice, or you may redeliver one by hand. SureBright recognises an order it has already handled and does not create its contracts again. |
| Can I delete **Order deleted** and **Order restored** because they never fire? | Keep them. They only fire when you delete or restore an order, which may be rare. Without them, plans on a deleted order stay active and you are billed for them. |
| Can I change the payload or API version? | Keep the WP REST API v3 payload on all four. |

## Refund, delete or restore an order

| You do this in WooCommerce | What happens to the plan |
|---|---|
| Refund a plan line | The contracts for the refunded quantity are cancelled. |
| Refund the covered product but leave the plan on the order | The sale shows in **Order Resolution** as a product-refunded case. See [Why a contract is on hold](/contracts/holds). |
| Change the customer's details on the order | The contract is updated. |
| Delete the order | The order's contracts are cancelled. |
| Restore a deleted order | The contracts cancelled by the delete are reinstated. |

## Find your contracts in the merchant portal

Contracts show under **Recent Sales** on the portal's [Sales](/merchant-portal/sales) page. A contract can appear a short while after the order. Plans SureBright could not pair with a product appear in **Order Resolution**.

## Related

- [Products](/merchant-portal/products)
- [Sales](/merchant-portal/sales)
- [Why a contract is on hold](/contracts/holds)
- [Test your setup](/platforms/test-your-setup)
