Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. /*** custom/modules/Contacts/logic_hooks.php ***/
  2. <?php
  3. $hook_version = 1;
  4. $hook_array = Array();
  5. $hook_array['before_save'] = Array();
  6. $hook_array['before_save'][] = array(1,'Sync Contact to LSP','custom/modules/Contacts/contacts_save.php','Contacts_SyncToLSP','sync_to_lsp',);
  7.  
  8.  
  9.  
  10.  
  11. /*** custom/modules/Contacts/contacts_save.php ***/
  12. <?php
  13. require('custom/cust_Development/Classes/cust_CallAPI.php');
  14.  
  15. class Contacts_SyncToLSP {
  16.  
  17.     function sync_to_lsp( $bean, $event, $arguments ) {
  18.         $GLOBALS['log']->fatal('RUNNING CONTACTS BEFORE_SAVE'); // THIS never shows up in the log
  19.         call_lpapi( 'contacts', $bean );
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement