WC_Email_Customer_Refunded_Order::init_form_fields()
Initialise settings form fields.
Description Description
Source Source
File: includes/emails/class-wc-email-customer-refunded-order.php
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | public function init_form_fields() { /* translators: %s: list of placeholders */ $placeholder_text = sprintf( __( 'Available placeholders: %s' , 'woocommerce' ), '<code>' . esc_html( 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' , ), 'subject_full' => array ( 'title' => __( 'Full refund subject' , 'woocommerce' ), 'type' => 'text' , 'desc_tip' => true, 'description' => $placeholder_text , 'placeholder' => $this ->get_default_subject(), 'default' => '' , ), 'subject_partial' => array ( 'title' => __( 'Partial refund subject' , 'woocommerce' ), 'type' => 'text' , 'desc_tip' => true, 'description' => $placeholder_text , 'placeholder' => $this ->get_default_subject( true ), 'default' => '' , ), 'heading_full' => array ( 'title' => __( 'Full refund email heading' , 'woocommerce' ), 'type' => 'text' , 'desc_tip' => true, 'description' => $placeholder_text , 'placeholder' => $this ->get_default_heading(), 'default' => '' , ), 'heading_partial' => array ( 'title' => __( 'Partial refund email heading' , 'woocommerce' ), 'type' => 'text' , 'desc_tip' => true, 'description' => $placeholder_text , 'placeholder' => $this ->get_default_heading( true ), '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, ), ); } |