Missing argument 2 for Event_Tickets_PRO tribe_get_cost()

Home Forums Ticket Products Eventbrite Tickets Missing argument 2 for Event_Tickets_PRO tribe_get_cost()

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #71105
    digitallifesciences
    Participant

    I installed the EB Tickets plugin today and I have warnings appearing on pages.

    It would appear it’s trying to get the cost, but the events are free, so I’m wondering if there is a function missing a default value or something?

    This ticket was opened by another user and the issue was not resolved because the Tribe developer was not able to recreate the issue – I would just like to point out that a simple google search of the discussion title will reveal several instances of this.

    #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 );
    }

    #71257
    Kelly
    Participant

    Hi, digitallifesciences. I’m sorry to hear that you’re having an issue with errors coming up.

    Would you mind posting the error so that we could look into it? Also, it would be helpful to be able to see the site in question. πŸ™‚

    Thanks!

    #73874
    Kelly
    Participant

    Hi, digitallifesciences. Since it’s been a couple of weeks, I’m going to close this thread. I hope that you were able to resolve it on your own. If not, please start a new thread.

    Thanks for being part of the Modern Tribe Community! πŸ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Missing argument 2 for Event_Tickets_PRO tribe_get_cost()’ is closed to new replies.