WP Video Subscriptions
  • General
  • Products
    • VS Netflix Theme
    • WP Video Memberships
  • FAQ
  • Developers
  • Submit A Ticket
  • General
  • Products
    • VS Netflix Theme
    • WP Video Memberships
  • FAQ
  • Developers
  • Submit A Ticket
Hooks & Filters / Do After New Membership

Do After New Membership

After a new membership has been created, you can optionally run your own function to update the users meta data and more.

Add the following to either your themes functions.php file or within your plugin files:

add_action( 'wpvs_do_after_new_membership', 'wpvs_my_custom_after_function', 10, 2 );

function wpvs_my_custom_after_function($user_id, $membership_array) {
    // YOUR CUSTOM CODE HERE
}

Parameters

  • user_id: The ID of the user who purchased the membership
  • membership_array: The new membership details (see below for variables)

membership_array structure:

array(
   'plan'           = (ID of Plan),
   'id'             = (Stripe Subscription ID, PayPal Billing Agreement ID or CoinGate Order ID),
   'amount'         = (Price of Membership),
   'name'           = (Name of Membership),
   'interval'       = (Membership Interval),
   'interval_count' = (Membership Interval Count),
   'ends'           = (timestamp - when the membership ends),
   'status'         = (status_of_subscription),
   'type'           = (stripe, paypal, coingate, stripe_test, paypal_test, coingate_test),
   'coin'           = (ONLY FOR COINGATE MEMBERSHIPS IF BTC OR LTC WAS USED)
);
VS Netflix Theme
Changelog Creating A Full-Width Menu Creating TV Shows & Series Customizing Your Theme Featured Area Sliders Importing Demo Content Turning On Video Reviews VS Netflix Shortcodes Why aren’t my videos displaying on the home page?
WP Video Memberships
Account Page Setup Adding Fields To Account Forms Changelog Free Memberships Hooks & Filters PayPal Payments Setup Restrict Members From WP Admin Stripe Payments Setup WP Video Memberships Shortcodes
General
Activating Your Website Helpful Links Restricting Vimeo Videos To Your Website Only
FAQ
Can’t Login on WordPress.com site Enabling Registration (Registration is disabled) How can I customize the Create Account form? Why aren’t my payment buttons displaying on the checkout page? Why won’t my Gmail work for sending emails?
Developers
Continue Watching for Custom Players Customizing WP Videos Archive Templates REST API Endpoints Restricting REST API Data
Cookie Notice Setup
Quick Links
  • General
  • VS Netflix Theme
  • WP Video Memberships
  • FAQ
Account
  • Login
Support
  • Submit A Ticket

© WP Video Subscriptions 2025