Woocommerce



  • The WooCommerce Core API code reference contains information about packages and classes that make up WooCommerce’s core functionality. Core Action and Filter Hooks This contains an index of hooks found across all template files, functions, shortcodes, widgets, data stores, and core classes.
  • SiteGround's WooCommerce GoGeek package for WooCommerce follows your site for $11.95 per month. WooCommerce Pricing: Design and Themes WooCommerce is designed to work seamlessly with most of the themes available on the market today.
  • WooCommerce is the world’s most customizable open-source eCommerce platform. Whether you’re launching a business, taking brick-and-mortar retail online, or developing sites for clients, use WooCommerce for a store that powerfully blends content and commerce.
Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, select a WooExpert or Developer for assistance. We are unable to provide support for customizations under our Support Policy.

What are Webhooks? ↑ Back to top

SHOPPING NIGHT 20% OFF STOREWIDE – USE THE CODE: lovelovelove Close X.

A Webhook is an event notification sent to a URL of your choice. Users can configure them to trigger events on one site to invoke behavior on another.

Webhooks are useful for integrating with third-party services and other external API that support them.

Webhooks in WooCommerce ↑ Back to top

Webhooks were introduced in WooCommerce 2.2 and can trigger events each time you add, edit or delete orders, products, coupons or customers.

It’s also possible to use webhooks with WooCommerce actions, e.g., Create a webhook to be used every time a product is added to the shopping cart, using the action woocommerce_add_to_cart.

Woocommerce Login

Webhooks also make it easier for third-party apps to integrate with WooCommerce.

Creating webhooks ↑ Back to top

To create a new webhook:

1/ Go to: WooCommerce > Settings > Advanced > Webhooks.
Note: Webhooks were formerly found under WooCommerce > Settings > API prior to WooCommerce 3.4.

2/ Select Create a new webhook (first incident) or Add webhook. The Webhook Data box appears.

3dcart

3/ Enter.

Woocommerce
  • Name: The name is auto-generated as “Webhook created on [date and time of creation]” as a standard to facilitate creation. Change the name to something else.
  • Status: Set to Active (delivers payload), Paused (does not deliver), or Disabled (does not deliver due delivery failures).
  • Topic: Indicate when the webhook should be triggered – Order Created, Product Deleted, or Customer Updated. There are also Action and Custom options.
    • Action Event: This option is available when the Topic is a WooCommerce Action, such as woocommerce_add_to_cart for when customers add products to the shopping cart.
    • Custom Topic: This option is for advanced users only. It’s possible to introduce new, customized topics with the help of woocommerce_webhook_topic_hooks filter.
  • Delivery URL: URL where the webhook payload is delivered.
  • Secret: The Secret Key generates a hash of the delivered webhook and is provided in the request headers. This defaults to the current API user’s consumer secret, if nothing is entered.
WoocommerceWoocommerceServices

Woocommerce Github

Plug-ins

4/ Save Webhook.

Note: The first time your webhook is saved with the Activated status, it sends a ping to the Delivery URL.

Editing and deleting webhooks ↑ Back to top

Webhooks are listed the same way as posts or products.

Woocommerce Webshop

  1. Find the webhook you wish to alter.
  2. Hover over the name, and Edit and Delete permanently options appear.
  3. Delete, or make Edits and Save changes. Bulk deletion is also possible with the dropdown.

Webhook logs ↑ Back to top

WooCommerce saves logs of all events triggering a webhook. Webhook logs are found at: WooCommerce > Status > Logs.

Woocommerce Shipping

Logs may be reviewed to see delivery and response from the server, making it simpler to integrate and debug.