From 2ddae203e2f930ce46fa798dbcc4bbafb7f2a195 Mon Sep 17 00:00:00 2001
From: heddn <lucashedding@1463982.no-reply.drupal.org>
Date: Tue, 1 Oct 2013 11:01:06 -0500
Subject: Issue #2102235 by heddn: No method getElementName for this instance
 of the class RulesLoop, RulesOr, etc

---
 modules/payment/commerce_payment.module |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/payment/commerce_payment.module b/modules/payment/commerce_payment.module
index b74f291..b4fb7d4 100644
--- a/modules/payment/commerce_payment.module
+++ b/modules/payment/commerce_payment.module
@@ -724,7 +724,7 @@ function commerce_payment_method_instance_load($instance_id) {
   $payment_method['settings'] = array();

   foreach ($rule->actions() as $action) {
-    if ($action->getElementName() == 'commerce_payment_enable_' . $method_id) {
+    if (method_exists($action, 'getElementName') && $action->getElementName() == 'commerce_payment_enable_' . $method_id) {
       if (is_array($action->settings['payment_method']) && !empty($action->settings['payment_method']['settings'])) {
         $payment_method['settings'] = $action->settings['payment_method']['settings'];
       }
--
1.7.10.4

