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.
I haven't looked at why in depth, but when using ===
the adjustment isn't removed compared to just ==
. Something must not be matching up properly and could do with the whole price object string/int/float mess.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2799375-2.patch | 763 bytes | mglaman |
Comments
Comment #2
mglamanhere is the patch which gets our tests to pass when remvoving an adjustment.
Comment #3
mglamanComment #4
mglamanPR: https://github.com/drupalcommerce/commerce/pull/493
Comment #5
mglamanHere's the deal. It might be my implementation. The `===` only works _if it is the exact same object_.
For example, the tests fail with `===` and creating a match object to try and remove.
.
So I guess if we want to decide: you must retrieve the object, compare it, and choose to remove it. Or be able to reconstruct the adjustment and say "remove something like this".
Comment #6
mglamanYou should get the adjustment, verify it, then remove it with the same object.