- Issue created by @Anybody
- First commit to issue fork.
- Merge request !24Issue #3469008: Use commerce_product_availability_get_availability_status_options() for add to cart button altering → (Merged) created by Grevil
- 🇩🇪Germany Anybody Porta Westfalica
Great, as just discussed we should keep
switch ($availability_status) { case 'in_stock': $form['actions']['submit']['#value'] = new TranslatableMarkup('Unavailable'); break;
as the only special case for now!
I hope this gives us and others a bit more flexibility.
BTW, if we need even more flexibility, we could add a "$context" variable to the function and alter hook! So users could differentiate. Perhaps add this idea as comment in the function, so we remember it, if needed?
- 🇩🇪Germany Grevil
BTW, if we need even more flexibility, we could add a "$context" variable to the function and alter hook
I'd say we create a minor issue for that if possible.
- 🇩🇪Germany Anybody Porta Westfalica
@grevil: Reopen to add that comment hint from #5 to the code by time...
Automatically closed - issue fixed for 2 weeks with no activity.