Closed (fixed)
Project:
Commerce Shipping
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2025 at 08:05 UTC
Updated:
10 Nov 2025 at 11:34 UTC
Jump to comment: Most recent
Move all hook implementations to a CommerceShippingHooks class and it should be registered as a service, for backwards compatibility with Drupal 10.
See https://www.drupal.org/node/3442349.
The #[LegacyHook] attribute must be used in order for the legacy hook to be ignored.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
tbkot commentedComment #5
jsacksick commentedOOP Preprocess hooks are only supported from D11.2. See https://www.drupal.org/node/3496491.
Also even if that was working, I noticed a typo (preprocess_HOOK) instead of the actual hook.
As a side note, interesting that we didn't use an event subscriber for reacting to the order deletion.
Comment #6
tbkot commented@jsacksick preprocess hooks moved back to the module. Order delete event added to the OrderSubscriber
Comment #9
jsacksick commentedMerged, thanks everyone!