Skip to content

fix: use GET for read-only venue booking abilities #109

Description

@chubes4

Problem

ECRoadie_ManageVenueBookings::run_ability() always sends POST to the WordPress Abilities REST run endpoint, including for read-only abilities such as extrachill/list-venue-bookings, extrachill/get-venue-booking, extrachill/get-venue-booking-activity, extrachill/list-booking-holds, and extrachill/list-booking-communications.

WordPress core's WP_REST_Abilities_V1_Run_Controller::validate_request_method() requires GET when an ability declares meta.annotations.readonly = true; POST returns rest_ability_invalid_method with HTTP 405.

Location

  • inc/tools/class-manage-venue-bookings.php:226-243
  • Core contract: wp-includes/rest-api/endpoints/class-wp-rest-abilities-v1-run-controller.php:101-132

Acceptance criteria

  • Dispatch each venue ability with the HTTP method required by its annotations.
  • Send read-only ability input through the input query parameter, matching the core run controller contract.
  • Keep write abilities on POST with { input: ... } JSON bodies.
  • Cover list, inspect, related-read aggregation, and write operations with method/payload assertions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions