setPlanVisibility( )


Sets visibility for non-archived pricing plans. Public plans are plans that are set to visible.

The setPlanVisibility() function returns a Promise that resolves to a pricing plan when its visibility has successfully been set.

By default, pricing plans are public, meaning they are visible. Plans can be hidden so that site members and visitors cannot see or choose them.

As opposed to archiving, setting visibility can be reversed. This means that a public plan can be hidden, and a hidden plan can be made public (visible).

Note: An archived plan always remains archived and cannot be made active again. When archiving a plan, its visibility property is automatically set to false so that it is hidden.

Changing a plan’s visibility does not impact existing orders for the plan. All orders for hidden plans are still active and keep their terms and payment options.

Only users with "Manage Pricing Plans" permissions can change plan visibility.

Method Declaration
Copy
Method Parameters
idstringRequired

The ID of the plan to either display or hide on the site page.


visiblebooleanRequired

Whether the plan is visible.

Returns
Return Type:Promise<Plan>
Did this help?