• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » Invite Codes » Invite Codes Documentation » Importing Invite Codes

Importing Invite Codes

The Invite Codes extension stores all invite codes in a simple custom table in the WordPress database.  This table is {prefix}wpmem_invite_codes (so if you use the default standard prefix “wp_” then the table would be wp_wpmem_invite_codes).

Depending on your version, you may also see wp_wpmem_invite_codes_meta, which is for storing data on invite code use.  This is not the same table and shouldn’t be used for importing.

If you need to create a large number of invite codes in bulk in an application like Excel, save as a CSV file and import into the wp_wpmem_invite_codes table directly using whatever database manager you use (such as phpMyAdmin or MySQL Workbench).

The columns your CSV should contain are:

  • invite_code – (required) – This is the actual invite code itself. These are case sensitive and can be all caps, all lowercase, or mixed case. Numbers are allowed.
  • description – (optional) – This is the description text for the code. You can use this for a note about the code, such as what it’s for, if it’s for a specific user, etc.
  • limit_use – (required) – MUST be a value of “y” or “n”.  If you plan to limit the number of uses for the code, this should be “y” otherwise, “n” (no quotes – that’s just for emphasis).
  • uses_remaining – (optional) – if limit_use is “y”, then this field needs to be included with the number of times the code can be used – 1 to whatever number of uses.
  • date_created – (required) – The date you are adding this code (cannot be in the future). MUST be in MySQL timestamp format which is YYYY-MM-DD hh:mm:ss. (do not use “/” and do not miss the hours:minutes:seconds).
  • date_active – (required) – The date the code becomes active. MUST be in MySQL timestamp format which is YYYY-MM-DD hh:mm:ss. (do not use “/” and do not miss the hours:minutes:seconds).
  • date_expired (optional) – This is the expiration date for the code. This is optional, but if used it MUST be in MySQL timestamp format which is YYYY-MM-DD hh:mm:ss. (do not use “/” and do not miss the hours:minutes:seconds).

IMPORTANT: The fields noted as “optional” above are optional with regards to whether the field can be empty or not.  However, your CSV file MUST include a column for this field, even if it is empty.

 

WP-Members Invite Codes

Plugin Info

Current Stable Version: 2.1.0
Minimum WordPress Version: 5.0
Tested up to WordPress Version: 6.5
Last Updated: 2024-04-06

Documentation

    • Setup
    • Importing Invite Codes
    • Upgrading
    • Filter Hooks
    • Action Hooks
    • API Functions
    • WP CLI Commands
    • Change Log

Get the Plugin

  • Purchase the Plugin
  • Get the Pro Bundle

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy