Compatibility fix to help run WooCommerce Tickets 3.9 with WooCommerce 2.3.x

Home Forums Ticket Products Event Tickets Plus Compatibility fix to help run WooCommerce Tickets 3.9 with WooCommerce 2.3.x

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #964384
    Joshua
    Participant

    Here’s what’s going on with the code below:

    When this code is being used, it allows me to add tickets to my cart… no problem.
    However, if I try to add tickets to another event, it replaces the tickets currently in the cart with the new event ticekts only allowing for one event in the cart at a time.

    If I remove this code and try to add a ticket, it redirects me to the cart but the cart is always empty.

    Working on this locally with the code active gives me a 502 bad gateway error when trying to add products to the cart.
    Working with this on the provided staging url, it won’t allow products to be added to the cart.

    On the staging url provided, I have the code in place so you can see how it overwrites the events in the cart when you try to add a different event.

    I really need a fix for this, we’re suppose to go live with this over the weekend.

    Thank you.

    // -----------------------------------------------------------------------------
    // The code below this comment should be added to the theme's functions.php file
    // -----------------------------------------------------------------------------
    // MEMORY SIZE EXHAUSTED ISSUE
    // Compatibility fix to help run WooCommerce Tickets 3.9 with WooCommerce 2.3.x
    if ( class_exists( 'TribeWooTickets' ) ) {
        // Form reference to ticket processing callback
        $wootickets = TribeWooTickets::get_instance();
        $callback = array( $wootickets, 'process_front_end_tickets_form' );
     
        // Switch to a later action
        remove_action( 'init', $callback );
        add_action( 'wp_loaded', $callback );
     }
    #964386
    Joshua
    Participant

    This reply is private.

    #964426
    Brian
    Keymaster

    Great, that was exactly what I was going to suggest to update to the latest version.

    I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Compatibility fix to help run WooCommerce Tickets 3.9 with WooCommerce 2.3.x’ is closed to new replies.