Is there a way to check for active subscription and prevent double subscription on the pricing plan page?

When I was doing a test on the subscription on my live page, I realised I was able to subscribe again after previously already having done that. May I know if there is a way to code and check if a user has any active membership subscription before allowing him/her to proceed with the purchase? Because the pricing plan app provided by Wix is prefixed and I’m unable to customize and do a coding on the individual elements (Eg. button, textbox etc.)