|
|
@@ -1,7 +1,16 @@
|
|
|
<?php
|
|
|
|
|
|
/**
|
|
|
-* push current product billing cycle to upgrade form
|
|
|
+* push current product billing cycle to upgrade form
|
|
|
+* converts the string into a format which matches {$upgradepackage.pricing.type}
|
|
|
+* "Free Account" => free
|
|
|
+* "One Time" => onetime
|
|
|
+* "Monthly" => monthly
|
|
|
+* "Quarterly" => quarterly
|
|
|
+* "Semi-Annually" => semiannually
|
|
|
+* "Annually" => annually
|
|
|
+* "Biennially" => biennially
|
|
|
+* "Triennially" => triennially
|
|
|
* @author Thurdata
|
|
|
*/
|
|
|
|
|
|
@@ -15,8 +24,8 @@ function current_billingcycle_hook($vars)
|
|
|
$billingcycle = Capsule::table('tblhosting')
|
|
|
->where('id',$id)
|
|
|
->value('billingcycle');
|
|
|
- return array("curbillingcycle" => $billingcycle);
|
|
|
- }
|
|
|
+ return array("curbillingcycle" => strtolower(str_replace('Account','',str_replace(' ','',str_replace('-','',$billingcycle)))));
|
|
|
+ }
|
|
|
}
|
|
|
add_hook("ClientAreaPageUpgrade", 1, "current_billingcycle_hook");
|
|
|
|