Problem/Motivation

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.

Command icon Show commands

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

jsacksick created an issue. See original summary.

tbkot made their first commit to this issue’s fork.

tbkot’s picture

Status: Active » Needs review
jsacksick’s picture

Status: Needs review » Needs work

OOP 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.

tbkot’s picture

Status: Needs work » Needs review

@jsacksick preprocess hooks moved back to the module. Order delete event added to the OrderSubscriber

khiminrm made their first commit to this issue’s fork.

  • jsacksick committed 1a3f0f75 on 3.x authored by tbkot
    [#3553757] feat: Convert hook implementations to OOP hooks
    
    By:...
jsacksick’s picture

Status: Needs review » Fixed

Merged, thanks everyone!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.