Table of Contents
Course Seats for LearnDash Filters
Filters for Remaining Seats #
/** * Filters the remaining seats * * @param int $remaining Remaining seats. * @param int $course_id Course ID. * @param array $users Enrolled Users. */ $remaining = (int) apply_filters( 'ea_course_seats_filter_remaining_seats', $remaining, $this->course_id, $users );
Filter to Not Show Negative Seats #
$show_negative_seats = apply_filters( 'ea_course_seats_show_negative_seats', false );
Filter for Remaining Course Seats Front end HTML Output #
/** * Filter the remaining course seats front end HTML output * * Default: * `<div class="ldsc_number_text"># Seat(s) Remaining</div>` * * @param string $html HTML output * @param int $remaining_seats Remaining seats */ $html = apply_filters( 'ea_course_seats_frontend_output', $html, $this->remaining_seats );
Filter to Check Available Course Seats to Prevent Woocommerce Checkout #
apply_filters( 'ea_course_seats_check_course_seats_for_woocommerce_purchase', false, $product )
Filter to Exclude LearnDash Course Price Types #
apply_filters('ea_course_seats_show_remaining_seats_price_types', array( 'closed', 'free', 'paynow', 'subscribe' ), $this->course_id );
CSS for “Seats Remaining” Bar #
If the “Seats Remaining” bar appears on your page multiple times, apply this CSS to only show the bar once.
.ldsc_number_text { display:none; } .ld-tabs-content .ldsc_number_text { display:block; }