Merge pull request #8099 from javorszky/webhook-filter

Adds a filter to webhook topic dropdown values
This commit is contained in:
Claudio Sanches 2015-05-02 17:28:52 -03:00
commit 7aa1774395
1 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php
$topic_data = $this->get_topic_data( $webhook );
$topics = array(
$topics = apply_filters( 'woocommerce_webhook_topics', array(
'' => __( 'Select an option&hellip;', '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 ) : ?>
<option value="<?php echo esc_attr( $topic_slug ); ?>" <?php selected( $topic_data['topic'], $topic_slug, true ); ?>><?php echo esc_html( $topic_name ); ?></option>