Kyle

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • Kyle
    Participant

    This reply is private.

    • This reply was modified 6 years, 8 months ago by Kyle.
    Kyle
    Participant

    Thanks for the update Nico, I will let you know how it goes!

    Kyle
    Participant

    I’ve investigated further and was able to resolve the issue. I’m going to describe how I solved it in case it might be helpful to others who stumble across this thread.

    I found out that it was due to a function that I had in my functions.php file to move the location of the ticket purchase form. Here is the function that caused the problem:

    
    /**
     * Tribe Event Tickets Plus
     * Move Ticket Form Below the Event Description
     * @see tribe_etp_move_tickets_purchase_form()
     */
    tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_content', 5 );
    
    /**
     * Moves the front-end ticket purchase form, accepts WP action/hook and optional hook priority
     * 
     * @param $ticket_location_action WP Action/hook to display the ticket form at
     * @param $ticket_location_priority Priority for the WP Action
     */
    function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {
      $etp_classes = array(
        'Tribe__Tickets_Plus__Commerce__EDD__Main',
      //  'Tribe__Tickets_Plus__Commerce__Shopp__Main', // As of ETP v4.0 Shopp will generate errors when referenced, if not active. Uncomment this line if you have Shopp Active
        'Tribe__Tickets_Plus__Commerce__WPEC__Main',
        'Tribe__Tickets_Plus__Commerce__WooCommerce__Main'
      );
      foreach ( $etp_classes as $ticket_class ) {
        if ( ! class_exists( $ticket_class ) ) break;
        $form_display_function = array( $ticket_class::get_instance(), 'front_end_tickets_form' );
        if ( has_action ( 'tribe_events_single_event_after_the_meta', $form_display_function ) ) {
          remove_action( 'tribe_events_single_event_after_the_meta', $form_display_function, 5 );
          add_action( $ticket_location_action, $form_display_function, $ticket_location_priority );
        }
      }
    }
    

    I found another support topic complaining of the same error and they mentioned removing unnecessary items from the $etp_classes array solved the problem for them. My stack trace indicates the error stems from the following source:

    
    #0 /.../plugins/event-tickets-plus/src/Tribe/Commerce/EDD/Main.php(1068): Tribe__Tickets_Plus__Commerce__EDD__Main->get_ticket('1544', '5690')
    

    Since I’m using WooCommerce I’ve removed items not related to WooCommerce from the array and it solved the issue. The function now looks like so:

    
    /**
     * Tribe Event Tickets Plus
     * Move Ticket Form Below the Event Description
     * @see tribe_etp_move_tickets_purchase_form()
     */
    tribe_etp_move_tickets_purchase_form( 'tribe_events_single_event_after_the_content', 5 );
    
    /**
     * Moves the front-end ticket purchase form, accepts WP action/hook and optional hook priority
     * 
     * @param $ticket_location_action WP Action/hook to display the ticket form at
     * @param $ticket_location_priority Priority for the WP Action
     */
    function tribe_etp_move_tickets_purchase_form ( $ticket_location_action, $ticket_location_priority = 10 ) {
      $etp_classes = array(
        'Tribe__Tickets_Plus__Commerce__WooCommerce__Main'
      );
      foreach ( $etp_classes as $ticket_class ) {
        if ( ! class_exists( $ticket_class ) ) break;
        $form_display_function = array( $ticket_class::get_instance(), 'front_end_tickets_form' );
        if ( has_action ( 'tribe_events_single_event_after_the_meta', $form_display_function ) ) {
          remove_action( 'tribe_events_single_event_after_the_meta', $form_display_function, 5 );
          add_action( $ticket_location_action, $form_display_function, $ticket_location_priority );
        }
      }
    }
    

    I can’t remember if I got this function from your site or not, but if you recognize it and it is something that has been shared in your official documentation, please be advised that it is causing these issues.

    • This reply was modified 7 years, 2 months ago by Kyle.
    Kyle
    Participant

    This is wonderful! I know there are definitely other things going on that are contributing to the load time, not just your plugins. I think this snippet is helping though, and every little bit counts, so thank you! 🙂

    I really appreciate your guys’ awesome support team, you’re so responsive and supportive. I hope you both have a wonderful day!

    Kyle
    Participant

    This reply is private.

    • This reply was modified 7 years, 3 months ago by Kyle.
    in reply to: Display User's Events in their Profile #1062613
    Kyle
    Participant

    Thanks George, this looks perfect! I’m excited to try this out!

    in reply to: Display User's Events in their Profile #1060665
    Kyle
    Participant

    Here is a mockup of what I’m envisioning:

    My Account My Events Section

    in reply to: Display User's Events in their Profile #1060645
    Kyle
    Participant

    Hi George,

    Here is a screenshot of the page I’m talking about:

    WooCommerce My Account Page

    I’m sure you’ll recognize this page – the WooCommerce “My Account page” – the front-facing page where customers can view their order history, edit their addresses, etc. As you can see I’ve changed the page title to “My Membership” (per my client’s request)

    Here’s a screenshot of the order detail since it was a ticket purchase:

    Order Detail #771

    My goal would be to add another section to the My Account page (the page that is shown in the first screenshot) with a heading “My Events” and list the events they have purchased tickets to with a link to the event page.

    Ideally I’d prefer to use action/filter hooks and not have to directly edit the My Account template. I’m already using add_action( ‘woocommerce_after_my_account’, ‘xyz_after_my_account’, 0 ); to display some ACF fields at the bottom of the page (I cropped that out of the screenshot to avoid confusion).

    Thanks!

    • This reply was modified 8 years, 3 months ago by Kyle.
    • This reply was modified 8 years, 3 months ago by Kyle.
    • This reply was modified 8 years, 3 months ago by Kyle.
Viewing 8 posts - 1 through 8 (of 8 total)