- Issue created by @megachriz
- 🇳🇱Netherlands megachriz
In the MR I provided a fix and tests. Some code for the tests are copied from the Commerce Abandoned Cart tests. I did try to programmatically created order by reusing code from RedirectTest, but I ran into the issue that the path /cart did not exist, probably related to the code that fakes a request.
I hope that the tests pass. I just noticed that there might be a random test failure happening.
- 🇳🇱Netherlands megachriz
I see that RedirectTest is failing, that's unrelated to this issue, but it's caused by that the signature of
createUser()has changed in Drupal. It now expects a list of permissions as first parameter. - 🇳🇱Netherlands megachriz
The tests look like they need work. I get indeed a random test failure.
- Issue was unassigned.
- Status changed to Needs work
8 months ago 10:11am 10 March 2025 - 🇮🇳India pemson18 South Goa
The `use_changed_timestamp` configuration setting should be moved to a configuration form, making it part of the module's settings. For checkout links, it is recommended that this configuration be global and not be overridden when calling the following method:
CheckoutLinkManager::generateUrl($order);Additionally, the method:
public static function generateHash($timestamp, OrderInterface $commerce_order);should be refactored to accept only two parameters. The value of `use_changed_timestamp` should then be retrieved from the module's configuration settings, rather than being passed as a parameter in the method call.
This approach ensures better consistency and flexibility by centralizing the configuration while simplifying the method signature.