Problem/Motivation

When migrating procedural / legacy hooks to OOP hooks, commerce_shipping_order_type_form_validate() and commerce_shipping_order_type_form_submit() remained in the .module file.

We should move those to CommerceShippingHooks.

I also wonder if we shouldn't move commerce_shipping_build_shipment_field_definition() to a helper utility class?

Can be static? I know if it's a static function decorating it is not really possible but at the same time decorating commerce_shipping_build_shipment_field_definition() isn't really possible today.

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

Sorry for the back & forth... Let's remove the ShipmentUtility class and go with a static method in the Shipment class (buildShipmentsFieldDefinition()).

tbkot’s picture

Status: Needs work » Needs review

  • jsacksick committed dc7f17e5 on 3.x authored by tbkot
    feat: #3557638 Move remaining procedural functions to...
jsacksick’s picture

Status: Needs review » Fixed

Merged, thanks!

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.