getPricingPlans not returning all plans

I want a repeater on a member’s page to return all the Pricing Plans that they have purchased, though using the code below, it only shows one of the member’s plans.

user.getPricingPlans()
  .then( (pricingPlans) => {
 let firstPlan = pricingPlans[0];
 let secondPlan = pricingPlans[1];
 let thirdPlan = pricingPlans [2];

$w("#text54").text = firstPlan.name 
$w("#text55").text = secondPlan.name //not returning a second purchased plan
$w("#text56").text = thirdPlan.name //not returning a third purchased plan

  } );

Once I get these second and third plans working, I would like these to appear in a repeater dynamic to each member.

Hi,
You should use the getCurrentMemberOrders ( ) function to get all of the member’s orders as the getPricingPlans() return only the active plans, note that you have to publish your site to use this API.
Also, check out this article about working with repeaters.