I am trying to create a Woocommerce marketplace to purchase one specific product at a time and the product is password protected. Woocommerce builtin password protected product is not used but custom CPT which is linked to actual product. CPT is used because i need some other information to store and because there are no suitable fields in Woocommerce product page.
The login is not actually login, but when the user enters the received code, the corresponding product is retrieved from the database and added to the shopping cart. Then the user is forwarded to the shopping cart and can purchase it. Certain information is also stored to custom PHP session and passed to the cart/checkout page.
I have been wondering whether that technology i use is suitable or whether it could be implemented in some other way? This way it needs to separate CPT to store additional values and also a real Woocommerce product.