Discourse+woocoomerce subscription

Is there a way, where if I have an active subscription in woocoomerce, then we can able to login discourse comunity otherwise not login in discourse.