{"id":928,"date":"2020-04-07T08:52:44","date_gmt":"2020-04-07T08:52:44","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/04\/07\/get-shipping-method-from-order-in-magento\/"},"modified":"2025-05-22T13:38:21","modified_gmt":"2025-05-22T08:08:21","slug":"get-shipping-method-from-order-in-magento","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/get-shipping-method-from-order-in-magento\/","title":{"rendered":"Short &#038; Sweet Way to Get Shipping Method From Order in Magento"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You can fetch the shipping method or carrier from the order in Magento.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The store owner can implement the conditions at checkout based on the shipping method, or develop a system of order tracking where the shipping method os required.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any feature based on the shipping and order fulfilment in Magento store may require the below code. So better bookmark this method to&nbsp;<em><strong>get shipping method from order in Magento<\/strong><\/em>!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method To Get Shipping Method From Order In Magento:<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$_order->getShippingMethod();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In this way, you can get the shipping method from the order object.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please share the solution with Magento community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can fetch the shipping method or carrier from the order in Magento. The store owner can implement the conditions at checkout based on the&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-928","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/928","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=928"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/928\/revisions"}],"predecessor-version":[{"id":14980,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/928\/revisions\/14980"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}