Showing one fuction from one plugin to another ( The Events Calendar + Events Tickets )

I’ve run into an issue and it seems i’m not able to solve it.

I’m using a plugin called The Events Calendar and an addon from same dev Event Ticket.

On the single page event there is a rsvp that shows how many tickets are avaialble.
I want to get this result and show it to the calendar tooltip on the The Events Calendar.

<td class=”tribe-ticket quantity” data-product-id=”<?php echo esc_attr( $ticket->ID ); ?>”>
<input type=”hidden” name=”product_id[]” value=”<?php echo absint( $ticket->ID ); ?>”>
<?php if ( $is_there_any_product_to_sell ) : ?>
<input
type=”number”
class=”tribe-ticket-quantity”
step=”1″
min=”0″
<?php if ( -1 !== $remaining ) : ?>
max=”<?php echo esc_attr( $remaining ); ?>”
<?php endif; ?>
name=”quantity_<?php echo absint( $ticket->ID ); ?>”
value=”0″
<?php disabled( $must_login ); ?>
>
<?php if ( $ticket->managing_stock() ) : ?>
<span class=”tribe-tickets-remaining”>
<?php echo sprintf( esc_html__( ‘%1$s out of %2$s available’, ‘event-tickets’ ), $ticket->available(), $ticket->capacity() ); ?>
</span>
<?php endif; ?>
<?php else: ?>
<span class=”tickets_nostock”><?php esc_html_e( ‘Out of stock!’, ‘event-tickets’ ); ?></span>
<?php endif; ?>
</td>

This is the function table where i get “29 out of 30 tickets available”

How can i call this function to the other plugin to show the just the availability message?

Thank you very much!

Read more here:: Showing one fuction from one plugin to another ( The Events Calendar + Events Tickets )

Leave a Reply

Your email address will not be published. Required fields are marked *