1. Home
  2. Docs
  3. Javascript API
  4. isSubscribed()


Prompty.isSubscribed() is an asynchronous function. It returns true if the user’s browser indicates there is an active subscription or false otherwise. The example code below demonstrates how to conditionally display a form to unsubscribed users.

async function checkSubStatus() {
	let status = await Prompty.isSubscribed();
	if (status == false) { $(".wpn-form").show(); }
Was this article helpful to you? Yes No

How can we help?