From fc66b8581a0e03eb383bb9e42d3f56b90a946d55 Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Sat, 2 May 2015 02:29:46 +0100 Subject: [PATCH] Adds a filter to webhook topic dropdown values Fixes #8098 --- includes/admin/settings/views/html-webhooks-edit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/admin/settings/views/html-webhooks-edit.php b/includes/admin/settings/views/html-webhooks-edit.php index f20a4da5c32..39e269bbbbd 100644 --- a/includes/admin/settings/views/html-webhooks-edit.php +++ b/includes/admin/settings/views/html-webhooks-edit.php @@ -46,7 +46,7 @@ if ( ! defined( 'ABSPATH' ) ) { get_topic_data( $webhook ); - $topics = array( + $topics = apply_filters( 'woocommerce_webhook_topics', array( '' => __( 'Select an option…', 'woocommerce' ), 'coupon.created' => __( 'Coupon Created', 'woocommerce' ), 'coupon.updated' => __( 'Coupon Updated', 'woocommerce' ), @@ -62,7 +62,7 @@ if ( ! defined( 'ABSPATH' ) ) { 'product.deleted' => __( 'Product Deleted', 'woocommerce' ), 'action' => __( 'Action', 'woocommerce' ), 'custom' => __( 'Custom', 'woocommerce' ) - ); + ) ); foreach ( $topics as $topic_slug => $topic_name ) : ?>