Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

How To Get Current Order Status And New Order Status In Magento 2

  1. #1
    Junior Member
    Join Date
    Nov 2022
    Location
    CA, USA
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How To Get Current Order Status And New Order Status In Magento 2

    The crazily adaptable Magento 2 platform enables us, as developers, to meet the demanding client demands!

    Is it not?


    The client wanted to do a particular action when the order status changed, and I recently encountered a situation similar to this. I needed to retrieve the most recent order status and the old order status in Magento 2.

    I immediately put that solution in this blog so that the developers wouldn't have to go through what I did to find the answer.

    The code provided below can be used to add features such as those that notify customers to utilize a coupon code when their order status changes from place to processing or that compute and refund tax when an order is placed and completed.

    To take any action when the order status changes in Magento 2, get the prior and subsequent order status using the shared code.

    Visit: https://meetanshi.com/blog/get-curre...-in-magento-2/

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    Canada
    Posts
    873
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    On the Administrator Board, Stores > Settings > Request Status . On the upper-right corner, click on Make New Status . Under the Request Status Data segment,

  3. #3
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Moves toward get current request status and new request status in Magento 2:
    Make di.xml record at application/code/Seller/Augmentation/and so on/envelope.
    Make OrderPlugin.php record at application/code/Seller/Augmentation/Module/

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •