| 12345678910111213141516 |
- <?php
- use Illuminate\Database\Capsule\Manager as Capsule;
- // this hook returns $addon->subscriptionid as $addon.code in smarty
- if (!defined("WHMCS"))
- die("This file cannot be accessed directly");
- add_hook('ClientAreaProductDetailsPreModuleTemplate', 1, function($vars) {
- foreach($vars['addons'] as $addon) {
- $servicecode[$addon['id']] = Capsule::table('tblhostingaddons')
- ->where('id', $addon['id'])
- ->value('subscriptionid');
- }
- return array('servicecodes' => $servicecode);
- });
|