Help to renew membership using the API
So this was my solution.  Using Wordpress triggers, its fired off whenever an order is submitted and successfully paid.  If it contains the product to create new/or renew then.  I hope it helps someone.  I still need to add some error traps, otherwise should work fine for my setup.

 # Product ID for the registered participant is noted below
 #error_log("Line items: $item\n");
 if ($item["product_id"] == 33706) {
     $result = civicrm_api3('Membership', 'get', [ 'sequential' =&gt; 1, 'contact_id' =&gt; $contactid, ]);
     if ($result["count"] == 0) {
         #create new membership entry
         #start date/end date will be today to 1 year out
         $start_date = date("Ymd");
         $end_date = date('Ymd', strtotime($start_date. ' + 1 year'));
         $result = civicrm_api3('Membership', 'create', [ 'membership_type_id' =&gt; "Registered Participant", 'contact_id' =&gt; $contactid, 'start_date' =&gt; $start_date, 'end_date' =&gt; $end_date, 'source' =&gt; $item["order_id"], ]);
     } else {
         #renew membership
         $current = $result[values][0];
         $current_start_date = $current['start_date'];
         $current_end_date = $current['end_date'];
         $membership_id = $result['id'];
         if ($current_end_date &lt; date()) {
             $new_start_date = date("Ymd");
         } else {
             $new_start_date = $current_end_date;
         }
         $new_end_date = date('Ymd', strtotime($new_start_date. ' + 1 year'));

         $result = civicrm_api3('Membership', 'create', [ 'membership_type_id' =&gt; "Registered Participant", 'contact_id' =&gt; $contactid, 'start_date' =&gt; $new_start_date, 'end_date' =&gt; $new_end_date, 'source' =&gt; $item["order_id"], 'status_id' =&gt; "Current", 'id' =&gt; $membership_id, ]);
     }
 }