Skip to content

7A. Stand the conflict pass down when the load gate says no - #64

Open
nikolaystrikhar wants to merge 2 commits into
47-lifecycle-actionsfrom
48-conflict-sees-the-load-gate
Open

7A. Stand the conflict pass down when the load gate says no#64
nikolaystrikhar wants to merge 2 commits into
47-lifecycle-actionsfrom
48-conflict-sees-the-load-gate

Conversation

@nikolaystrikhar

Copy link
Copy Markdown
Contributor

What: Conflict\Detector::is_in_conflict() applies {prefix}/plugin_absorber/should_load, so the conflict pass at plugins_loaded priority 5 sees the gate the load pass reads at 6.

Usage:

add_filter( 'give/plugin_absorber/should_load', static function ( $load, $sub_plugin ) {
    return 'give-recurring' === $sub_plugin->get_slug() ? false : $load;
}, 10, 2 );
// The standalone is left active, and no merge notice claims it was replaced.

Why this way:

A veto used to cost the site the feature outright. Under the default policy the standalone was deactivated, the merge notice said the bundled copy had taken over, the request redirected — and priority 6 then required nothing. docs/filters.md steers hosts straight into it: a per-slug return false is its only worked example.

The filter goes last. It is host code, so the sub-plugin must be enabled, name a standalone, and have that standalone running before any of it executes — which is also where the load pass asks it, and it keeps the filter off every request that has no conflict.

No new catch. Boot\Scheduler wraps the step in catch ( Throwable ) and Conflict\Resolver catches per sub-plugin, so a filter that throws is already reported and already survivable.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Enterprise

Run ID: a7333cd5-920f-47d6-85f0-73cba7ff0bb5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

The container clause outlived the registry refactor: a reader holds its own registrar,
so a container that cannot supply one fails while the pass is built. What can still
throw is the hook name the load gate is read under. "Both methods" predates the
stranding guard, which made three.
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