Skip to content

Instantly share code, notes, and snippets.

@MrVibe
Created March 3, 2020 11:19
Show Gist options
  • Save MrVibe/d18a2c0700806e52a2005767a2d4314e to your computer and use it in GitHub Desktop.
Save MrVibe/d18a2c0700806e52a2005767a2d4314e to your computer and use it in GitHub Desktop.
Add Custom label in Batch Sidebar on Seats Full.
add_action('wplms_batches_extras',function($batch_id){
$enable_seats = groups_get_groupmeta($batch_id,'enable_seats');
if(!empty($enable_seats)){
$count = groups_get_total_member_count($batch_id);
$batch_seats = groups_get_groupmeta($batch_id,'batch_seats');
if($count >= $batch_seats){
echo '<a href="URL_TO_CONTACT_PAGE" class="full">'.__('Waiting','wplms-batches').'</a>';
}
}
},10,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment