Advertisement
eventsmanager

Auto Approved Offline Payment

Oct 23rd, 2017 (edited)
1,917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. /*
  2. This snippet will auto approved Offline Payment Gateway
  3. */
  4. function my_offline_auto_approve_filter( $result, $EM_Booking ){
  5. //$EM_Event = $EM_Booking->get_event()
  6. /*
  7. foreach($EM_Event->get_categories() as $EM_Category){
  8.  
  9. }
  10. */
  11. if( $EM_Booking->booking_meta['gateway'] == 'offline' ){
  12. $EM_Booking->set_status(1,false);
  13. }
  14. return $result;
  15. }
  16. add_filter('em_booking_save', 'my_offline_auto_approve_filter', 100, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement