3

I am trying to edit the label of a default Commerce Order status (Pending:pending).

I have tried through commerce_order.api.php like it is explained in this post: Change order status string from "Completed" to "Shipped" and on this page but unfortunately it did not work for me. More, in this PHP file, the Completed status should display Finished and it doesn't work either??

The Commerce custom Order Status works fine with new statuses but I did not find any way to edit default ones.

Thanks for any tip.

  • Solution in this link drupal.stackexchange.com/questions/118385/… works for me. Kindly paste your code for changing Label. – Vamsi Sep 26 '16 at 11:19
  • Considering your success with the related post, I guess my code is wrong, I am currently working on it, I'll be back. Thanks – Toki Sep 26 '16 at 13:27
  • A "noob" mistake made my custom module wrong. Everything is fine and works with Ryan's solution in drupal.stackexchange.com/questions/118385/… – Toki Sep 26 '16 at 13:37
  • I think you should rework your last comment into an actual answer from your self (and mark it as accepted). That way this question will no longer be shown as "unanswered". – Pierre.Vriens Feb 3 '17 at 10:11
0

Ryan's solution in Change order status string from "Completed" to "Shipped" works finally, my code was wrong.

So, for anyone having the same need, create a mini-custom module using the function hook_commerce_order_status_info_alter (dependencies commerce_order) and paste your new label like it is done for Completed status.

You may find the exact status machine names (e.g. "pending") in commerce_order.module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.