From 055a5cd6b7ec44cadf6a7ec1743834188a32704f Mon Sep 17 00:00:00 2001
From: Axel Rutz <axel.rutz@clever-systems.net>
Date: Fri, 3 Feb 2012 23:58:00 +0100
Subject: [PATCH] fixed #1427780: DrupalCommerceEntityController::save should
 fire hook after cache update

---
 includes/commerce.controller.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/commerce.controller.inc b/includes/commerce.controller.inc
index 5605f67..4ab08a5 100644
--- a/includes/commerce.controller.inc
+++ b/includes/commerce.controller.inc
@@ -229,8 +229,6 @@ class DrupalCommerceEntityController extends DrupalDefaultEntityController imple
         ->execute();
       }
 
-      $this->invoke($op, $entity);
-
       // Update the static cache so that the next entity_load() will return this
       // newly saved entity.
       $this->entityCache[$entity->{$this->idKey}] = $entity;
@@ -239,6 +237,8 @@ class DrupalCommerceEntityController extends DrupalDefaultEntityController imple
       unset($this->lockedEntities[$entity->{$this->idKey}]);
       $this->releaseLock();
 
+      $this->invoke($op, $entity);
+
       // Ignore slave server temporarily.
       db_ignore_slave();
       unset($entity->is_new);
-- 
1.7.5.4

