• 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 » PayPal Subscriptions » PayPal Subscriptions Documentation » Filter and Action Hooks » wpmem_exp_after_set_exp

wpmem_exp_after_set_exp

Description

This is an action hook in the PayPal Subscription Extension. It comes at the end of the function wpmem_set_exp which sets the expiration date for the user.  The action passes the user ID and a toggle to tell if it is a new subscription or a subscription renewal.

Parameters

$user_id
(integer)(optional) The user’s database primary key.

$renew
(boolean)(optional) Indicates if this is a renewal or a new subscription.

Example

add_action( 'wpmem_exp_after_set_exp' 'do_update_after_exp', 10, 2 );

function do_update_after_exp( $user_id, $renew ) {
    /**
     * You can use this action to do things immediately after the
     * user expiration date is set. At this point in the process,
     * the user has effectively paid.
     *
     * $user_id is the user's ID which can be used to update
     * user meta fields, or to retrieve/update information 
     * about the user.
     *
     * $renew tells you if this is a renewal or a new
     * subscription.
     */

    return;
}

Changelog

  • Introduced in extension version 0.4

Source

wpmem_exp_after_set_exp is located in  /includes/class-wp-members-expiration-user.php

WP-Members PayPal Subscriptions

Plugin Info

Current Stable Version: 0.9.9.1
Minimum WordPress Version: 5.0
Tested up to WordPress Version: 6.8
Last Updated: 2025-04-17

Documentation

    • Registration and Payment Flow
    • Setup
    • Offering a Trial Period
    • IPN Log File
    • Manage Users
    • PayPal IPN Configuration
    • PayPal Developer Tools
    • Filter and Action Hooks
    • Templates
    • Customization Examples
    • Change Log
    • FAQs

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