Skip to content

Commit c30af4b

Browse files
theodespCopilot
andauthored
Update plugins/wp-graphql-headless-webhooks/src/Handlers/WebhookHandler.php
Co-authored-by: Copilot <[email protected]>
1 parent 6213b0d commit c30af4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/wp-graphql-headless-webhooks/src/Handlers/WebhookHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function handle( Webhook $webhook, array $payload ): void {
3131

3232
$args = [
3333
'headers' => $webhook->headers ?: [ 'Content-Type' => 'application/json' ],
34-
'timeout' => 15, // Increased from 5 to 15 seconds for better reliability
34+
'timeout' => apply_filters( 'graphql_webhooks_timeout', 15 ), // Configurable timeout with a default of 15 seconds
3535
'blocking' => false,
3636
'sslverify' => apply_filters( 'graphql_webhooks_sslverify', true, $webhook ),
3737
'user-agent' => 'WPGraphQL-Webhooks/' . ( defined( 'WPGRAPHQL_WEBHOOKS_VERSION' ) ? WPGRAPHQL_WEBHOOKS_VERSION : '1.0.0' ),

0 commit comments

Comments
 (0)