Skip to content

feat: webhooks admin UI #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

feat: webhooks admin UI #239

wants to merge 8 commits into from

Conversation

josephfusco
Copy link
Member

@josephfusco josephfusco commented Jun 3, 2025

Description

Related Issue

Type of Change

  • ✅ Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactoring (no functional changes)
  • 📄 Example update (no functional changes)
  • 📝 Documentation update
  • 🔍 Performance improvement
  • 🧪 Test update

How Has This Been Tested?

  1. pnpm dev wp-graphql-headless-webhooks
  2. Add a new webhook and select an event (https://webhook.site/ works well for testing)
  3. Trigger that event (e.g. create a new post)

Screenshots

CleanShot 2025-06-09 at 18 29 13@2x
CleanShot 2025-06-09 at 18 29 48@2x
CleanShot 2025-06-09 at 19 44 12@2x

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the project's coding standards
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • Any dependent changes have been highlighted, merged or published

Copy link

github-actions bot commented Jun 3, 2025

ℹ️ Download the wp-graphql-headless-webhooks plugin artifact from this workflow run (see the 'Artifacts' section at the bottom).

Copy link

github-actions bot commented Jun 9, 2025

ℹ️ Download the hwp-previews plugin artifact from this workflow run (see the 'Artifacts' section at the bottom).

Copy link

github-actions bot commented Jun 9, 2025

ℹ️ Download the hwp-previews plugin artifact from this workflow run (see the 'Artifacts' section at the bottom).

Copy link

github-actions bot commented Jun 9, 2025

ℹ️ Download the hwp-previews plugin artifact from this workflow run (see the 'Artifacts' section at the bottom).

Copy link

github-actions bot commented Jun 9, 2025

ℹ️ Download the wp-graphql-headless-webhooks plugin artifact from this workflow run (see the 'Artifacts' section at the bottom).

Comment on lines +44 to +56
/**
* Get allowed HTTP methods for webhooks.
*
* @return array<string, string> Array of method values and labels.
*/
public function get_allowed_methods(): array {
return apply_filters(
'graphql_webhooks_allowed_methods',
array(
'POST' => __( 'POST', 'wp-graphql-headless-webhooks' ),
'GET' => __( 'GET', 'wp-graphql-headless-webhooks' ),
)
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file had a lot of linting fixes, however this is the main bit that was added.

Comment on lines +47 to +48
'show_ui' => false,
'show_in_menu' => false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are surfacing the custom post type within settings -> webhooks, so there is no need to show the default WordPress post type UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant