Setting Up an External Storefront with WooCommerce
  • 3 Minutes to read
  • Dark
    Light

Setting Up an External Storefront with WooCommerce

  • Dark
    Light

Article Summary

You can also sell learning plans through SmarterU’s integrated eCommerce or an external storefront. For details, contact our Success Desk.

Setting Up Webhooks in WooCommerce

SmarterU will only process orders that have a valid date_paid attribute and a status attribute of Completed. This is important for two reasons: 

  1. Depending on how your WooCommerce storefront is set up, orders may not complete automatically. If this is the case, then orders will need to be moved from pending to complete manually in the WordPress admin. If you wish to ensure that your orders are completed automatically, there are a few things you can do: 
  • Set your product(s) to be both Virtual and Downloadable. Orders for this type of product will complete automatically by default.
  • Use a WordPress plugin to auto complete your orders after they have been paid
  • Add your own custom WordPress code. 
  1. WooCommerce does not provide webhooks that trigger on order-paid events. This means that one or more of the other webhook topics will need to be used instead. Orders will behave differently depending on how your storefront and its products are configured.

    If you are unsure which webhook topics you need, set up two webhooks in WooCommerce — one with its Topic set to Order Created, the other with its Topic set to Order Updated. Aside from the Topic, the settings for each will be identical. This will ensure that orders will always be processed on SmarterU once they meet the required criteria in WooCommerce (completed and paid).

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

After setting up your learning plan in SmarterU, reach out to our Success Desk and let them know that you wish to make the learning plan available through your SmarterU storefront.
  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



Was this article helpful?