setPlanVisibility( )


Sets visibility for non-archived pricing plans.

The setPlanVisibility() functions 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 public 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.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Pricing Plans
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
_idstringRequired

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


visiblebooleanRequired

Whether to set the plan as visible.

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