Skip to content

Instantly share code, notes, and snippets.

@boxbilling
Created February 14, 2012 07:18
Show Gist options
  • Select an option

  • Save boxbilling/1824466 to your computer and use it in GitHub Desktop.

Select an option

Save boxbilling/1824466 to your computer and use it in GitHub Desktop.

Revisions

  1. Development Team created this gist Feb 14, 2012.
    46 changes: 46 additions & 0 deletions Hook_Custom.php
    Original 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)
    {

    }
    }