woocommerce_api_create_webhook_data

woocommerce_api_create_webhook_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_create_webhook_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-webhooks.php line 181
    			if ( ! current_user_can( 'manage_woocommerce' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_webhooks', __( 'You do not have permission to create webhooks.', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_webhook_data', $data, $this );
    
    			// validate topic
    			if ( empty( $data['topic'] ) || ! wc_is_webhook_valid_topic( strtolower( $data['topic'] ) ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_invalid_webhook_topic', __( 'Webhook topic is required and must be valid.', 'woocommerce' ), 400 );
    			}
    
    
  • /includes/legacy/api/v3/class-wc-api-webhooks.php line 181
    			if ( ! current_user_can( 'manage_woocommerce' ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_user_cannot_create_webhooks', __( 'You do not have permission to create webhooks.', 'woocommerce' ), 401 );
    			}
    
    			$data = apply_filters( 'woocommerce_api_create_webhook_data', $data, $this );
    
    			// validate topic
    			if ( empty( $data['topic'] ) || ! wc_is_webhook_valid_topic( strtolower( $data['topic'] ) ) ) {
    				throw new WC_API_Exception( 'woocommerce_api_invalid_webhook_topic', __( 'Webhook topic is required and must be valid.', 'woocommerce' ), 400 );
    			}