pmpro_areLevelsFree

The Paid Memberships Pro pmpro areLevelsFree function.

Description

pmpro_areLevelsFree( $levelarr ); 

Parameters (1)

0. $levelarr
The levelarr.

Usage

  1. if ( !function_exists( 'pmpro_areLevelsFree' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'paid-memberships-pro/includes/functions.php'; 
  3.  
  4. // The levelarr. 
  5. $levelarr = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = pmpro_areLevelsFree($levelarr); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/functions.php  
  1. function pmpro_areLevelsFree($levelarr) { 
  2. if(! is_array($levelarr)) { return false; } 
  3. foreach($levelarr as $curlevel) { 
  4. if(!empty($curlevel) && ($curlevel->initial_payment > 0 || $curlevel->billing_amount > 0 || $curlevel->trial_amount > 0)) { 
  5. return false; 
  6. return true;