Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is dependent on #2730365: Return the line item updated in commerce_discount_set_existing_line_item_price() and #2730369: Return the line item created in commerce_discount_add_line_item() and will allow modules to make additional adjustments to the discount line item created out of BOGO offers.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2730371-6.discounted_line_item_alter.patch | 4.26 KB | rszrama |
#5 | 2730371-5.discounted_line_item_alter.patch | 3.04 KB | rszrama |
#2 | 2730371.discounted_line_item_alter.patch | 2.53 KB | rszrama |
Comments
Comment #2
rszrama CreditAttribution: rszrama at Centarro for DPCI commentedStill needs docs in .api.php but otherwise ready for review / testing.
Comment #3
mglaman;!
Comment #4
mglamanAlso.. should it be an invoke? Modules implementing the alter will need to save. Alter has the context you are modifying before save, or the lack of needing to save.
Comment #5
rszrama CreditAttribution: rszrama at Centarro for DPCI commentedYou're right, changed it to a normal invoke with our own saving logic.
Comment #6
rszrama CreditAttribution: rszrama at Centarro for DPCI commentedFinal pass with API docs.
Comment #7
rszrama CreditAttribution: rszrama at Centarro for DPCI commentedCommitted!