Tribe__Tickets__Editor__Blocks__Rsvp::get_threshold( int $post_id )

Get the threshold.


Parameters

$post_id

(int) (Required)


Top ↑

Return

(int)


Top ↑

Source

File: src/Tribe/Editor/Blocks/Rsvp.php

	public function get_threshold( $post_id = 0 ) {

		/** @var Tribe__Settings_Manager $settings_manager */
		$settings_manager = tribe( 'settings.manager' );
		$threshold        = $settings_manager::get_option( 'ticket-display-tickets-left-threshold', 0 );

		/**
		 * Overwrites the threshold to display "# tickets left".
		 *
		 * @param int   $threshold Stock threshold to trigger display of "# tickets left"
		 * @param int   $post_id  Event ID.
		 *
		 * @since 4.11.1
		 */
		$threshold = absint( apply_filters( 'tribe_display_rsvp_block_tickets_left_threshold', $threshold, $post_id ) );

		return $threshold;
	}

Top ↑

Changelog

Changelog
Version Description
4.12.3 Introduced.