Add field in woocommerce email setting tab in dashboard

enter image description here

I wanted to add a field in WooCommerce > Settings > Emails tab. In this section there is a list of email template and on clicking any template you can see this screen.

I want to add another field to this section for every template.

I manage to achieve it but I’m feeling its not a proper way.

My code is as follow:

add_filter( 'woocommerce_settings_tabs_email', 'emailText' );

function emailText($args) {

        ?>
        <div class="EmailText">
            <label for="EmailText">Email Text</label>
            <textarea id="EmailText" class="widefat" name="email_text"></textarea>
        </div>
        <?php

    }

It displays the field but I cannot save anything in it.

Read more here: Add field in woocommerce email setting tab in dashboard

Leave a Reply

Your email address will not be published. Required fields are marked *