Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created May 3, 2021 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewlimaza/c95d28bc825817dccaa5bf46b374ab8e to your computer and use it in GitHub Desktop.
Save andrewlimaza/c95d28bc825817dccaa5bf46b374ab8e to your computer and use it in GitHub Desktop.
Grant user's with level 4 access to all Addon Packages
<?php
/**
* Give user's with level ID 4 free access to all Addon Packages content.
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmproap_all_access_levels( $levels ) {
$levels = array( 4 ); //change the level ids here
return $levels;
}
add_filter( "pmproap_all_access_levels", "my_pmproap_all_access_levels" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment