title: Scheduling a product stock reduction BUT wp_schedule_single_event doesn't seem to fire my function
body: <p>Inside a private custom plugin for use in the WordPress/woocommerce backend, I need to schedule a product stock reduction.  Using a plugin called <a href="https://wordpress.org/plugins/wp-crontrol/" rel="nofollow noreferrer">WP Crontrol</a>, I am able to see that my wp_cron is successfully recording the scheduling commands, but when I select "Run Now" to test the stock reduction function, it doesn't fire (even though WP Control reports that the task was successful).  I suspected that it had something to do with how I was passing the arguments array in <code>wp_schedule_single_event</code>, but I've tried every iteration I can think of.  Can you guys see any red flags in the code below?  Thanks in advance.</p>
  
  <p>Here's part of the function that executes the scheduling function (please note that the event seems to be successfully scheduling at the proper time.):</p>
  
  <pre><code>$x=0;
  foreach ($robot_array as $index_key =&gt; $index_value){
      if ($x &lt;= 1){
          wc_add_order_item_meta($passed_order_item, $index_value['product']['name'], $index_value['product']['sku']); 
          $product = New WC_Product($index_value['product']['id']);
          $product-&gt;set_stock(1, 'subtract'); 
          unset($product);
      }  elseif ($x &gt; 1 &amp;&amp; $x &lt;= 11){
          wc_add_order_item_meta($passed_order_item, $index_value['product']['name'], $index_value['product']['sku']);
          $time = new DateTime();
          $time-&gt;add(add_months($x, $time));
          $args = array($index_value['product']['id']);
          wp_schedule_single_event($time-&gt;getTimestamp(), 'cmcs_scheduled_stock_reduction', $args);
          unset($time);
      }
      $x++;
  }
  </code></pre>
  
  <p>Here's the function that is supposed to fire:</p>
  
  <pre><code>add_action('cmcs_scheduled_stock_reduction', 'cmcs_scheduled_stock_reduction_callback', 10, 2);
  
  function cmcs_scheduled_stock_reduction_callback($args) {
      global $woocommerce, $wpdb;
      $product_id = $args;
      do_action( 'add_debug_info', $args);
      $product = New WC_Product($product_id);
      $product-&gt;set_stock(1, 'subtract'); 
      unset($product);
  }
  </code></pre>