randydrew6
Customer
I want to update an external database when a certain item is purchased with points, I know I can probably achieve this with the item's callback function but how exactly does one go about using that? Xenforo 1.5.4 btw
<?php
class monthly
{
static function OneMonthSupporter(array &$buyer, $purchaseId, array $purchaseInfo)
{
$userUpgradeModel = XenForo_Model::create('XenForo_Model_UserUpgrade');
$userUpgradeModel->upgradeUser(4, getUserUpgradeById(8), true, null);
}
}
?>
Do you have any idea as to why it isn't upgrading the user with id 4?No. The first of the two fields is the class name, the second field is the method name.
DBTech_Shop_Something_Else
::someMethod
Would mean a method namedsomeMethod
in the aforementioned class file, and it must be static.
We use essential cookies to make this site work, and optional cookies to enhance your experience.