Skip to content

Commit

Permalink
Fixed #598
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Dec 27, 2018
1 parent be23200 commit 6d22621
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG-v2.md
@@ -1,5 +1,10 @@
# Release Notes for Craft Commerce 2.x

## Unreleased

### Fixed
- Fixed a bug where the custom shipping method set on an order could not be retrieved with `Order::getShippingMethod()`

## 2.0.0-beta.15 - 2018-12-27

### Changed
Expand Down
4 changes: 3 additions & 1 deletion src/elements/Order.php
Expand Up @@ -1382,7 +1382,9 @@ public function getShippingMethodId()
*/
public function getShippingMethod()
{
return Plugin::getInstance()->getShippingMethods()->getShippingMethodByHandle((string)$this->shippingMethodHandle);
$shippingMethods = Plugin::getInstance()->getShippingMethods()->getAvailableShippingMethods($this);

return $shippingMethods[$this->shippingMethodHandle] ?? null;
}

/**
Expand Down

0 comments on commit 6d22621

Please sign in to comment.