title: Woocommerce Subscriptions update next payment date from functions.php
body: <p>I would like to change the next payment date of active subscriptions after the Initial (first) Subscription payment is completed after the trial period.</p>
  
  <pre><code>        &lt;?php   global $woocommerce;
          $all_meta_for_user = get_user_meta( 53 );
                      $order = new WC_Order(4843);
          $order_id=4846;//PUT YOUR ORDER ID HERE
                      $subscription    = wcs_get_subscription( 4846 );
          add_action('woocommerce_subscription_payment_complete', 'nextpaymentdatechange', 10, 1);  
  
          function nextpaymentdatechange($order_id){
          if (WC_Subscriptions_Order::order_contains_subscription($order_id)) {
  
              $nextdate = get_post_meta( $order_id, '_schedule_next_payment', true );
              $threedays_ago = date('Y-m-d H:i:s', strtotime('-15 days', strtotime($nextdate)));
              update_post_meta($order_id , '_schedule_next_payment', $threedays_ago);
          }
          } ?&gt;
  </code></pre>