Created
February 14, 2012 07:18
-
-
Save boxbilling/1824466 to your computer and use it in GitHub Desktop.
Custom Event Hook which uses product plugin for BoxBilling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Example product plugin usage | |
*/ | |
class Hook_Custom | |
{ | |
public static function onAfterOrderActivate(Box_Event $event) | |
{ | |
$order = $event->getSubject(); | |
$plugin = $order->Product->plugin; | |
if($plugin == 'MyPlugin') { | |
// init plugin class | |
// do something with plugin on order activation action | |
} | |
} | |
public static function onAfterOrderRenew(Box_Event $event) | |
{ | |
} | |
public static function onAfterOrderSuspend(Box_Event $event) | |
{ | |
} | |
public static function onAfterOrderUnsuspend(Box_Event $event) | |
{ | |
} | |
public static function onAfterOrderCancel(Box_Event $event) | |
{ | |
} | |
public static function onAfterOrderUncancel(Box_Event $event) | |
{ | |
} | |
public static function onAfterOrderDelete(Box_Event $event) | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment