• 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 » Download Protect » Download Protect Documentation » Filter Hooks » wpmem_dp_verify

wpmem_dp_verify

Description

Allows you to filter whether the user can download or not.

Parameters

$args
(array)(required) An array of arguments passed from handle_download().

key => The file’s key (a post meta value used to locate the file)
user_verified => boolean, If the user is verified to download the file, default: false

file_info => array (

post_id => The post ID
results => raw $results array from SQL select
post => The post object for this post ID
meta => All post meta for this post ID
raw_file => The basename() of the file path (returned from get_attached_file())
path => Path to the file’s download location

)

Usage

// Example validates user by membership product

add_filter( 'wpmem_dp_verify', 'my_download_verification' );
function my_download_verification( $args ) {
    
    $membership = 'my_membership_product'; // The meta key of the membership.
    
    if ( wpmem_user_has_access( $membership ) ) {
        $args['user_verified'] = true;
    }
    
    return $args;
}

Changelog

  • Introduced in 1.0.0

Source

wpmem_block is located in includes/class-wp-members-download-protect.php

WP-Members Download Protect

Plugin Info

Current Stable Version: 1.9.9
Minimum WordPress Version: 5.0
Tested up to WordPress Version: 6.6
Last Updated: 2024-10-17

Documentation

    • Installation
    • Settings
    • Upload Files
    • Download Tracking
    • Shortcodes
    • Filter Hooks
    • WP CLI Commands
    • FAQs
    • 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