Plugin Contributor
Paolo
(@paoltaia)
Hi,
1) There is no way to do that out of the box. The only option that comes to my mind would be to add the IP field and use that as the code.
Adding it to their profile is the tricky part. What are you using for users’ profiles?
2) Do you mean an option to pay by card without logging into the Paypal account?
If that’s the question, PayPal doesn’t allow you to buy a subscription without having a PayPal account and being logged in. Otherwise, users couldn’t manage their subscriptions if they needed to do so.
Let me know if I misunderstood your questions.
Thanks.
hey Paolo, I’m using WP_Users your plugin.
2/ I understand, thanks.
Hi @acmonjlk,
I’m not sure I understand the first question correctly. Will users have a unique code for each subscription they purchase or does each user get only one unique code regardless of how many subscriptions they have? Also, how do you intend to generate the unique codes?
Each subscription has a unique ID that you can use as the “unique code” code. Use the function below to retrieve the subscription IDs of the currently logged-in` user.
$subscription_ids = getpaid_get_subscriptions(
array(
'customer_in' => get_current_user_id(),
'fields' => 'id',
)
);