Okay
  Public Ticket #2899864
ticket purchases in shop
Closed

Comments

  •  1
    jatolimon started the conversation

    Customers can access to the shop and buy tickets for a event but it does not reflect on the available tickets of the event, and they neigther can select the date on a recurrent event. What is the best way of dealing with this?

    Regards,

    Pablo

  •  1
    jatolimon replied

    Hi again,

    maybe I did not explain myself. What I mean is I don't want to allow users buying tickets in the main address of my shop:

    https://astrotrevinca.com/shop

    But if I turn this proucts to private, for example, users can't buy from the event page.

    Regards,
    Pablo.

  •  894
    Zhivko replied

    Hi,

    Try following:

    Open your theme or child-theme functions.php file and add this filter:

    // Hide STEC tickets from product query
    
    add_action('woocommerce_product_query', function($q) {     $meta_query = (array) $q->get('meta_query');     $meta_query[] = array(
            'key'     => 'stec_bookable',
            'value'   => 1,
            'compare' => '!='
        );     $q->set('meta_query', $meta_query); });



    Stachethemes Developer