Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.53 KB | None | 0 0
  1.     foreach ($order_info['products'] as $k => $v) {
  2.  
  3.         // Generate ekey if EDP is ordered
  4.         if (!empty($v['extra']['is_edp']) && $v['extra']['is_edp'] == 'Y') {
  5.             continue; // don't track inventory
  6.         }
  7.  
  8.         // Update product amount if inventory tracking is enabled
  9.         if (Registry::get('settings.General.inventory_tracking') == 'Y') {
  10.  
  11.             /**
  12.              * Executes when changing order status before changing a product stock balance in the database.
  13.              *
  14.              * @param int     $order_id            Parent order identifier
  15.              * @param string  $status_to           New parent order status (one char)
  16.              * @param string  $status_from         Old parent order status (one char)
  17.              * @param array   $force_notification  Array with notification rules
  18.              * @param boolean $place_order         True, if this function have been called inside of fn_place_order function.
  19.              * @param int     $child_order_id      Child order identifier
  20.              * @param string  $child_status_to     New child order status (one char)
  21.              * @param boolean $change_child_status If true, the child order status will be changed
  22.              * @param string  $k                   Product cart ID
  23.              * @param array   $v                   Cart product data
  24.              */
  25.             fn_set_hook('change_order_status_before_update_product_amount', $order_id, $status_to, $status_from, $force_notification, $place_order, $order_info, $k, $v);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement