Skip to content

Commit 3f9722a

Browse files
committed
restore getSupportEmail
1 parent 5d9f5d4 commit 3f9722a

File tree

1 file changed

+8
-0
lines changed
  • src/app/code/community/Zendesk/Zendesk/Helper

1 file changed

+8
-0
lines changed

src/app/code/community/Zendesk/Zendesk/Helper/Data.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,16 @@ public function getOrderDetail($order)
229229

230230
public function getSupportEmail($store = null)
231231
{
232+
// Serves as the dafault email
232233
$domain = Mage::getStoreConfig('zendesk/general/domain', $store);
233234
$email = 'support@' . $domain;
235+
236+
// Get the actual default email from the API, return the default if somehow none is found
237+
$defaultRecipient = Mage::getModel('zendesk/api_supportAddresses')->getDefault();
238+
239+
if (!is_null($defaultRecipient)) {
240+
$email = $defaultRecipient['email'];
241+
}
234242

235243
return $email;
236244
}

0 commit comments

Comments
 (0)