Advertisement
Guest User

Looping GW_Inventory

a guest
Apr 14th, 2016
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. foreach( array( 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 30, 31, 32 ) as $session_id ) {
  2.  
  3. $field_id_3 = floatval($session_id .'.3');
  4. new GW_Inventory( array(
  5. 'form_id' => 18,
  6. 'field_id' => $field_id_3,
  7. 'stock_qty' => 25,
  8. 'out_of_stock_message' => '<div style="border: 1px solid #e6db55; background-color: #FFFFE0; padding: 10px;">' . $field_id_3 . ' Sorry, this session is sold out.</div>',
  9.  
  10. 'not_enough_stock_message' => 'Sorry, You requested %1$s seats. There are only %2$s seats left.',
  11. 'approved_payments_only' => false,
  12. 'hide_form' => false,
  13. 'enable_notifications' => true
  14. ) );
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement