Created
February 14, 2012 07:18
-
-
Save boxbilling/1824466 to your computer and use it in GitHub Desktop.
Revisions
-
Development Team created this gist
Feb 14, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,46 @@ <?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) { } }