eventsmanager

Auto Approved Offline Payment

Oct 23rd, 2017
989
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. This snippet will auto approved Offline Payment Gateway
  3. */
  4. function my_offline_auto_approve_filter( $result, $EM_Booking ){
  5. if( $EM_Booking->booking_meta['gateway'] == 'offline' ){
  6. $EM_Booking->set_status(1,false);
  7. }
  8. return $result;
  9. }
  10. add_filter('em_booking_save', 'my_offline_auto_approve_filter', 100, 2);
RAW Paste Data