Problem/Motivation

Currently, the LateOrderProcessor invokes a save on shipments.

This needs to be skipped in certain situations. This adds a method to determine if the save should occur, allowing other modules to decorate the service and override when needed.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TomTech created an issue. See original summary.

TomTech’s picture

Status: Active » Needs review
FileSize
1.03 KB
TomTech’s picture

Changed shouldSave() to accept ShipmentInterface rather than OrderInterface.

jsacksick’s picture

Status: Needs review » Needs work

Almost good! We should make 2 small changes though:

shouldSave() should be made protected and should basically contain the following:

protected function shouldSave(ShipmentInterface $shipment) {
  return $shipment->hasTranslationChanges();
}

So we only call shouldSave().

  • jsacksick committed 1348cc4 on 8.x-2.x authored by TomTech
    Issue #3279815 by TomTech, jsacksick: Allow LateOrderProcessor to skip...
jsacksick’s picture

Status: Needs work » Fixed
FileSize
1.56 KB

Made the changes, and committed the patch, attaching it for reference.

Status: Fixed » Closed (fixed)

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