Skip to content

Conversation

@budzanowski
Copy link
Contributor

Summary

Replaces is_method() with get_method() in WP_REST_Abilities_List_Controller to fix backwards compatibility with earlier WordPress versions where is_method() does not exist on WP_REST_Request.

Changes

  • Changed $request->is_method( 'HEAD' ) to $request->get_method() === 'HEAD' in class-wp-rest-abilities-list-controller.php:108

🤖 Generated with Claude Code

Replace is_method() with get_method() for WordPress compatibility. The is_method() method does not exist on WP_REST_Request in earlier WordPress versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Oct 2, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: budzanowski <budzanowski@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.69%. Comparing base (80f47ee) to head (14d825b).
⚠️ Report is 1 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk      #98   +/-   ##
=========================================
  Coverage     85.69%   85.69%           
  Complexity      103      103           
=========================================
  Files            16       16           
  Lines           776      776           
  Branches         86       86           
=========================================
  Hits            665      665           
  Misses          111      111           
Flag Coverage Δ
javascript 92.66% <ø> (ø)
unit 82.97% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gziolo gziolo added the [Type] Bug Something isn't working label Oct 2, 2025
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Thank you for the fix 👍🏻

@gziolo gziolo merged commit 41ec679 into WordPress:trunk Oct 2, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants