WC_Email_New_Order::init_form_fields()
Initialise settings form fields.
Description Description
Source Source
File: includes/emails/class-wc-email-new-order.php
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | public function init_form_fields() { /* translators: %s: list of placeholders */ $placeholder_text = sprintf( __( 'Available placeholders: %s' , 'woocommerce' ), '<code>' . implode( '</code>, <code>' , array_keys ( $this ->placeholders ) ) . '</code>' ); $this ->form_fields = array ( 'enabled' => array ( 'title' => __( 'Enable/Disable' , 'woocommerce' ), 'type' => 'checkbox' , 'label' => __( 'Enable this email notification' , 'woocommerce' ), 'default' => 'yes' , ), 'recipient' => array ( 'title' => __( 'Recipient(s)' , 'woocommerce' ), 'type' => 'text' , /* translators: %s: WP admin email */ 'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s.' , 'woocommerce' ), '<code>' . esc_attr( get_option( 'admin_email' ) ) . '</code>' ), 'placeholder' => '' , 'default' => '' , 'desc_tip' => true, ), 'subject' => array ( 'title' => __( 'Subject' , 'woocommerce' ), 'type' => 'text' , 'desc_tip' => true, 'description' => $placeholder_text , 'placeholder' => $this ->get_default_subject(), 'default' => '' , ), 'heading' => array ( 'title' => __( 'Email heading' , 'woocommerce' ), 'type' => 'text' , 'desc_tip' => true, 'description' => $placeholder_text , 'placeholder' => $this ->get_default_heading(), 'default' => '' , ), 'additional_content' => array ( 'title' => __( 'Additional content' , 'woocommerce' ), 'description' => __( 'Text to appear below the main email content.' , 'woocommerce' ) . ' ' . $placeholder_text , 'css' => 'width:400px; height: 75px;' , 'placeholder' => __( 'N/A' , 'woocommerce' ), 'type' => 'textarea' , 'default' => $this ->get_default_additional_content(), 'desc_tip' => true, ), 'email_type' => array ( 'title' => __( 'Email type' , 'woocommerce' ), 'type' => 'select' , 'description' => __( 'Choose which format of email to send.' , 'woocommerce' ), 'default' => 'html' , 'class' => 'email_type wc-enhanced-select' , 'options' => $this ->get_email_type_options(), 'desc_tip' => true, ), ); } |