SmarterU Success Center

Setting Up an External Storefront with WooCommerce

Setting Up Webhooks in WooCommerce

To set up a webhook in WooCommerce:

  1. Log into the admin portal of your WooCommerce store.
  2. Hover over the WooCommerce menu on the left side of the screen and select Settings.

Interface gráfica do usuário, Texto  Descrição gerada automaticamente

  1. On the Settings page, select the Advanced tab.
  2. Select the Webhooks sub-tab.

Interface gráfica do usuário  Descrição gerada automaticamente

  1. Click Add Webhook.

Interface gráfica do usuário, Site  Descrição gerada automaticamente

The Webhook Data workscreen displays.

Interface gráfica do usuário, Aplicativo  Descrição gerada automaticamente

  1. Specify the following settings.

Name

The name of the webhook.

Status

Set to Active.

Topic

Select the event you want to trigger the webhook. If you are unsure which Topic to use, create one webhook with its Topic set to Order Created, and a second webhook with its Topic set to Order Updated. Other than the Topic, all other settings for these webhooks will be the same.

Delivery URL

This is where the webhook will be sent. This must be:

https://<SmarteruPortal>/ecommerce/woocommerce/rest-api/index.cfm

where <SmarteruPortal> is an active portal CNAME or Keyword for your SmarterU account.

Secret

Enter a secret key to be used by SmarterU to verify the authenticity of each webhook request. This value must exactly match the Secret Key value that is entered in the SmarterU storefront settings.

API Version

Select WP REST API Integration V3.

  1. Click Save Webhook.
  2. Copy the <SmarteruPortal> and Secret to your SmarterU external storefront.

Setting Up Products

When an order is created, product information will be sent in the webhook to SmarterU. WooCommerce products can represent a SmarterU subscription variant or a learning plan.

SmarterU identifies which subscription variant or learning plan your products represent by matching their SKU values. Your WooCommerce products will need to be set up with a SKU, and that SKU will then need to be added to your matching subscription variant or learning plan.

To set up a product in WooCommerce:

  1. Log into the admin portal of your WooCommerce store.
  2. Hover over the Products heading in the menu on the left side of the screen and select Add New.

Interface gráfica do usuário  Descrição gerada automaticamente com confiança baixa

  1. In the General tab, add a price for the product.

Interface gráfica do usuário, Texto, Aplicativo, Email  Descrição gerada automaticamente

  1. In the Inventory tab, enter a SKU for the product. The SKU value that you enter must exactly match the subscription variant SKU (if selling subscriptions) or Learning Plan ID (if selling learning plans) that you enter in your settings in SmarterU.

Interface gráfica do usuário, Texto, Aplicativo, Email  Descrição gerada automaticamente

  1. If you wish to set the product to be both Virtual and Downloadable (see the note at the top of this page), you can enable both of those options here. Orders for this type of product will complete automatically by default.

Interface gráfica do usuário, Texto, Aplicativo, Email  Descrição gerada automaticamente