commerce_cart calls its cart provider to finalize the cart on "place" workflow transition. Due to the lack of transition events at the time of writing, this was implemented within commerce_cart_commerce_order_presave(). Now we can use an event subscriber instead

CommentFileSizeAuthor
#2 refactor_finalizecart-2827747-2.patch3.79 KBcornifex
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agoradesign created an issue. See original summary.

cornifex’s picture

Status: Active » Needs review
FileSize
3.79 KB

This patch removes the presave hook from commerce_cart.module and adds an event subscriber that reacts to order place pre-transition event.

PR on Github: https://github.com/drupalcommerce/commerce/pull/573

bojanz’s picture

Title: Refactor finalizeCart() call into worfklow transition event subscriber » Refactor commerce_cart_commerce_order_presave() into a transition event subscriber
Priority: Minor » Normal

bojanz’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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