Home Forums Plugins WooCommerce Email Template Customizer how to load regular order in custom email template

how to load regular order in custom email template

  • Author
    Posts
  • #150213

    cdevice
    Participant

    email type is “appointment_confirmed” from bookingwp is registred and the villatheme email template theme is used, but the context with wc_order is not loaded.

    I found a undocumented hook, but i am not able to load the order from it

    function termin_load_template( $args ) {
    $appointment = wc_appointments_maybe_appointment_object( $appointment );
    $appointment = $appointment ? $appointment : get_wc_appointment( 0 );
    $wc_order = $appointment->get_order();

    if($wc_order) {
    $args[’email’] = $wc_order;
    }
    }
    add_action( ‘viwec_email_template’, ‘termin_load_template’, 9 );

    bookingwp plugin is very popular and some documentation to use it with the email template pro would be very well come

You must be logged in to see replies to this topic. Click here to login or register