(self, product: Union[Product, str])
return False
Checks to see if this customer has an active subscription to the given product.

        :param product: The product for which to check for an active subscription.
        :type product: Product or string (product ID)

        :returns: True if there exists an active subscription, False otherwise.
Checks to see if this customer has an active subscription to the given product.
Checks to see if this customer has an active subscription to the given product .
def is_subscribed_to(self, product: Union[Product, str]) -> bool:
        """
        Checks to see if this customer has an active subscription to the given product.

        :param product: The product for which to check for an active subscription.
        :type product: Product or string (product ID)

        :returns: True if there exists an active subscription, False otherwise.
        """

        if isinstance(product, StripeModel):
            product = product.id

        for subscription in self._get_valid_subscriptions():
            for item in subscription.items.all():
                if item.price and item.price.product.id == product:
                    return True
        return False
def is_subscribed_to ( self , product : Union [ Product , str ] ) -> bool : if isinstance ( product , StripeModel ) : product = product . id for subscription in self . _get_valid_subscriptions ( ) : for item in subscription . items . all ( ) : if item . price and item . price . product . id == product : return True return False