Title: custom fields
Last modified: October 26, 2021

---

# custom fields

 *  Resolved [acmonjlk](https://wordpress.org/support/users/acmonjlk/)
 * (@acmonjlk)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/custom-fields-384/)
 * Hey guys, I wonder .. how can I add custom fields to a subscription? I would 
   like to be able to add a unique code to each user and that this is associated
   with their subscription and the user can see it from their profile
 * additionally I would like to know what I have to do so that when making payments
   through paypal, the option to pay by card appears.
 * Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Paolo](https://wordpress.org/support/users/paoltaia/)
 * (@paoltaia)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/custom-fields-384/#post-15008822)
 * 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.
 *  Thread Starter [acmonjlk](https://wordpress.org/support/users/acmonjlk/)
 * (@acmonjlk)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/custom-fields-384/#post-15008844)
 * hey Paolo, I’m using WP_Users your plugin.
 * 2/ I understand, thanks.
 *  Plugin Contributor [Noptin Newsletter Team](https://wordpress.org/support/users/picocodes/)
 * (@picocodes)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/custom-fields-384/#post-15024266)
 * Hi [@acmonjlk](https://wordpress.org/support/users/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',
       		)
       	);
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘custom fields’ is closed to new replies.

 * ![](https://ps.w.org/invoicing/assets/icon-256x256.png?rev=2729282)
 * [Payment forms, Buy now buttons, and Invoicing System | GetPaid](https://wordpress.org/plugins/invoicing/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/invoicing/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/invoicing/)
 * [Active Topics](https://wordpress.org/support/plugin/invoicing/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/invoicing/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/invoicing/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Noptin Newsletter Team](https://wordpress.org/support/users/picocodes/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/custom-fields-384/#post-15024266)
 * Status: resolved