Restrict subscriptions to valid pending accounts only
User story: I am a brand new user. I want to subscribe to LDH services, so that I can use them.
User story: I am an existing shop customer. I want to subscribe to LDH services, so that I can use them.
User story: I am an operator. I want to restrict subscriptions, so that users of invalid accounts are not frustrated.
Restrict the LDH subscription product so that only pending LDH users can purchase it. Existing LDH users cannot purchase it. Existing non-LDH WooCommerce users cannot purchase it.
2. Optional migration
Existing non-LDH WooCommerce users can migrate to an LDH account.
This ticket covers part 1, restriction. For part 2, see https://source.puri.sm/liberty/ldh_woocommerce/issues/4
Scenario 1: New users can subscribe
Given the WooCommerce user is signed in And they have an LDH address And they do not already have a subscription When they attempt to subscribe Then they should succeed
In all other cases they should fail, specifically:
Scenario 2: Non-LDH users cannot subscribe
Given user is anonymous (not signed in) Or they do not have an LDH address When they view the product list Then the LDH product does not appear (And attempts to directly use the LDH product URL must also fail)
Scenario 3: Existing subscribers cannot subscribe again
Given the user is signed in And they have an LDH address And they already have a subscription When they attempt to subscribe a second time Then they should fail (And attempts to directly use the LDH product URL must also fail)