Home Forums Plugins WooCommerce Email Template Customizer Custom message in template with php controls

Custom message in template with php controls

  • Author
    Posts
  • #187714

    Gabriele Franceschi
    Participant

    Hi, is it possible to insert custom controls into email templates to indicate wording? For example, I would need to enter a message only if the payment method is by bank transfer or the shipping method is collection on site. In the standard template I had set this control with:

    $payment_method = $order->get_payment_method();
    $shipping_method = @array_shift($order->get_shipping_methods());
    if ( $payment_method == ‘bacs’ || isset($shipping_method) && $shipping_method->get_method_id() == ‘local_pickup’) {
    echo ‘<h3>Attenzione:</h3>’;
    echo ‘<p>Se il pagamento o il ritiro della merce non verrà effettuato entro i 10 giorni dalla conferma dell\’ordine, l\’ordine verrà annullato automaticamente senza avviso.</p>’;
    }

    Thanks

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