Don't send email on a particular shipping

Home Forums Ticket Products Event Tickets Plus Don't send email on a particular shipping

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #988769
    Florent
    Participant

    Hi,

    Topic title must be clear 😉 I need that Wootickets don’t send tickets by email when the customers select a particular shipping (local pickup for example)

    I know stop sending email ( remove_action( ‘wootickets-send-tickets-email’) … ) but how to deactivate it only when a particular shipping module is selected ?

    Other question : how to integrate the ticket’s block to another post (shortcode ? or via function PHP ?

    Thanks in advance

    #989008
    Nico
    Member

    Hi Florent,

    Thanks for reaching out to us! Interesting question indeed, hopefully I can help you out on this one.

    Please add the following snippet to your functions.php file:


    add_action( 'wootickets-send-tickets-email', 'maybe_send_order_email', 1 );
    function maybe_send_order_email ( $order_id ) {

    $order = new WC_Order( $order_id );

    if ( $order->get_shipping_method() == 'some_method' ) {
    // prevent email notification
    add_filter( 'woocommerce_email_enabled_wootickets', '__return_false' );
    }
    }

    Regarding the tickets form, Can you please open up a new thread for that? We try to keep just one issue per thread so other users can easily find and benefit from previously answered questions.

    Please let me know if you can customize it to fit your need,
    Best,
    Nico

    #993863
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Don't send email on a particular shipping’ is closed to new replies.