spencerfcloud

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Advanced Custom Fields Conflict #1426631
    spencerfcloud
    Participant

    Hey Brendan. Thanks for your patience on this. I had time to do some testing on my local environment and found the issue. There was some code in functions.php that was causing the issue when Event Ticket Plus was activated:

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

    }

    /*
    * TO MOVE THE TICKET FORM UNCOMMENT ONE OF THE FOLLOWING
    */

    /*
    * Uncomment to Move Ticket Form Below Related Events
    */
    //tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_after_the_meta’, 20 );

    /*
    * Uncomment to Move Ticket Form Below the Event Description
    */
    //tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_after_the_content’, 5 );

    /*
    * Uncomment to Move Ticket Form Above the Event Description
    */
    tribe_etp_move_tickets_purchase_form( ‘tribe_events_single_event_before_the_content’ );
    `

    I’m not sure when this was added, but it must have been for a previous version of Event Tickets Plus / Events Calendar. I tested the site without the code and it didn’t seem to be doing anything as far as form placement goes (or anything else besides the admin bug), so I removed it and the bug went away. Thanks!

    • This reply was modified 8 years, 4 months ago by spencerfcloud.
Viewing 1 post (of 1 total)