title: WooCommerce Subscription - Change Next Bill Date on New Subscription Depending on Variation ID
body: <p>I am on WordPress using WooCommerce and the WooCommerce Subscriptions plugin.</p>
  <p>I have 1 Product with 3 Subscription Variants:</p>
  <ol>
  <li>Quarterly (set to renew every 3rd month) Variation ID 208</li>
  <li>2 Quarter (set to renew every 6th month) Variation ID 209</li>
  <li>Annual (set to renew every year) Variation ID 210</li>
  </ol>
  <p>I needed a way to force the next bill date depending on which variation a customer purchased.</p>
  <p>I'm a 10000% NOOB here. But I was able to piece together the following code. I just want to make sure 2 things:</p>
  <ol>
  <li>It isn't going to crash my site or bring it down</li>
  <li>It won't affect renewal orders -- I want this to be on NEW orders only</li>
  </ol>
  <p>I really appreciate any help!</p>
  <pre><code>add_action('woocommerce_thankyou', 'nextpaymentdatechange', 10, 1);  
  
  function nextpaymentdatechange( $order_id ){
      $order = wc_get_order( $order_id );
  $items = $order-&gt;get_items(); 
  foreach ( $items as $item_id =&gt; $item ) {
     $product_id = $item-&gt;get_variation_id() ? $item-&gt;get_variation_id() : $item-&gt;get_product_id();
     if ( $product_id === 208 ) {
          $subid = $order_id + 1;
          $nextdate = get_post_meta( $subid, '_schedule_next_payment', true );
          $threedays_ago = date( 'Y-m-d H:i:s', strtotime( '2020-11-1 11:59:59', strtotime( $nextdate )) );
          update_post_meta( $subid , '_schedule_next_payment', $threedays_ago);
     }
      else{ if ( $product_id === 209 ) {
          $subid = $order_id + 1;
          $nextdate = get_post_meta( $subid, '_schedule_next_payment', true );
          $threedays_ago = date( 'Y-m-d H:i:s', strtotime( '2020-2-1 11:59:59', strtotime( $nextdate )) );
          update_post_meta( $subid , '_schedule_next_payment', $threedays_ago);
      }
           else{
                if ( $product_id === 210 ) {
          $subid = $order_id + 1;
          $nextdate = get_post_meta( $subid, '_schedule_next_payment', true );
          $threedays_ago = date( 'Y-m-d H:i:s', strtotime( '2021-8-1 11:59:59', strtotime( $nextdate )) );
          update_post_meta( $subid , '_schedule_next_payment', $threedays_ago);
      }
           }
          
      }
     }
  }
  </code></pre>