digitallifesciences

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Missing argument 2 for Event_Tickets_PRO tribe_get_cost() #71109
    digitallifesciences
    Participant

    This is the function causing the issue. Documentation suggests postId should be optional – it’s not(lib/tribe-eventbrite.class.php on line 231).

    /**
    * Event Cost
    *
    * If EventBrite plugin is active
    * – If the event is registered in Eventbrite, and has one ticket. Return the cost of that ticket.
    * – If the event is registered in Eventbrite, and there are many tickets, return “Varies”
    * – If the event is not registered in Eventbrite, and there is meta, return that.
    * – If the event is not registered in Eventbrite, and there is no meta, return “”
    *
    * @param null|int $postId (optional)
    * @param bool $withCurrencySymbol Include the currency symbol
    * @return string Cost of the event.
    */
    public function tribe_get_cost( $cost, $postID, $withCurrencySymbol ){
    if ( class_exists( ‘Eventbrite_for_TribeEvents’ ) ) {
    global $spEventBrite;
    $returned = $spEventBrite->tribe_get_cost( $postId );
    if ( $returned ) {
    $cost = esc_html( $returned );
    }
    }
    return apply_filters( ‘tribe_eb_event_get_cost’, $cost, $postID, $withCurrencySymbol );
    }

Viewing 1 post (of 1 total)