Wordpress WC Vendor: Trigger booking confirmation notification when booking status changes from Paid to Confirmed

by Alena   Last Updated December 07, 2017 11:08 AM

I want to send booking confirmation notification to vendor and site administrator when booking status changes from Paid to Confirmed.

I tried the following code in functions.php

add_action('woocommerce_booking_paid_to_confirmed', 'new_booking_confirmation_email_to_vendor', 10, 2 );


function new_booking_confirmation_email_to_vendor( $booking_id ){

    $booking_confirmation_email = new WC_Email_Booking_Confirmed();
    $booking_confirmation_email->schedule_trigger($booking_id);
}

But it doesn't work! :( How can I trigger confirmation notification properly in this hook?



Related Questions


Wocommerce Variation Product ajax add to cart

Updated April 07, 2015 20:03 PM



Woocomerce paypal payment successfull hook

Updated September 17, 2016 09:03 AM

WooCommerce and do_action hooks

Updated July 27, 2015 14:03 PM