Expose Availability Checkers in the Admin UI

Created on 22 April 2025, 3 days ago

Describe your bug or feature request.

Introducing new availability checkers directly into Commerce Core can break existing stores if they’re enabled by default (see issue Add an availability checker which checks if the entity is accessible or not Needs work ).
Site builders also need a straightforward way to enable or disable individual availability rules without writing custom service overrides.

Proposal

  • Introduce AvailabilityCheckerWithMetadataInterface that availability checkers may implement to expose themselves in the admin UI via provided labels and descriptions.
  • Add an “Availability” section under Store → Configuration → Order settings.
  • In this section, list all availability checkers implementing AvailabilityCheckerWithMetadataInterface, providing checkboxes to enable or disable each individually.
  • Legacy availability checkers (those without metadata support) remain hidden from the UI and always execute. A deprecation notice will be dispatched to encourage maintainers to adopt the metadata interface before Commerce 4.
  • Preserve the execution order of all checkers via service weight.
  • Core‑shipped checkers implementing AvailabilityCheckerWithMetadataInterface (see Add an availability checker which checks if the entity is accessible or not Needs work ) should be:
    • Enabled by default on new sites
    • Disabled by default on existing sites
Feature request
Status

Active

Version

3.0

Component

Order

Created by

🇳🇴Norway zaporylie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024