woocommerce_email_settings

Translators: %s: default color.

Description

apply_filters( 'woocommerce_email_settings', (array) $var ); 

Parameters (1)

0. $var — Optional. (array) => array(array( 'title' => __( 'Email notifications', 'woocommerce' ), 'desc' => __( 'Email notifications sent from WooCommerce are listed below. Click on an email to configure it.', 'woocommerce' ), 'type' => 'title', 'id' => 'email_notification_settings' ),array( 'type' => 'email_notification' ),array( 'type' => 'sectionend', 'id' => 'email_notification_settings' ),array( 'type' => 'sectionend', 'id' => 'email_recipient_options' ),array( 'title' => __( 'Email sender options', 'woocommerce' ), 'type' => 'title', 'desc' => '', 'id' => 'email_options' ),array( 'title' => __( '"From" name', 'woocommerce' ), 'desc' => __( 'How the sender\'s name appears in outgoing WooCommerce emails.', 'woocommerce' ), 'id' => 'woocommerce_email_from_name', 'type' => 'text', 'css' => 'min-width:300px;', 'default' => esc_attr( get_bloginfo( 'name', 'display' ) ), 'autoload' => false, 'desc_tip' => true, ),array( 'title' => __( '"From" address', 'woocommerce' ), 'desc' => __( 'How the sender\'s email appears in outgoing WooCommerce emails.', 'woocommerce' ), 'id' => 'woocommerce_email_from_address', 'type' => 'email', 'custom_attributes' => array( 'multiple' => 'multiple', ), 'css' => 'min-width:300px;', 'default' => get_option( 'admin_email' ), 'autoload' => false, 'desc_tip' => true, ),array( 'type' => 'sectionend', 'id' => 'email_options' ),array( 'title' => __( 'Email template', 'woocommerce' ), 'type' => 'title', 'desc' => sprintf( __( 'This section lets you customize the WooCommerce emails. Click here to preview your email template.', 'woocommerce' ), wp_nonce_url( admin_url( '?preview_woocommerce_mail=true' ), 'preview-mail' ) ), 'id' => 'email_template_options' ),array( 'title' => __( 'Header image', 'woocommerce' ), 'desc' => __( 'URL to an image you want to show in the email header. Upload images using the media uploader (Admin > Media).', 'woocommerce' ), 'id' => 'woocommerce_email_header_image', 'type' => 'text', 'css' => 'min-width:300px;', 'placeholder' => __( 'N/A', 'woocommerce' ), 'default' => '', 'autoload' => false, 'desc_tip' => true, ),array( 'title' => __( 'Footer text', 'woocommerce' ), 'desc' => __( 'The text to appear in the footer of WooCommerce emails.', 'woocommerce' ), 'id' => 'woocommerce_email_footer_text', 'css' => 'width:300px; height: 75px;', 'placeholder' => __( 'N/A', 'woocommerce' ), 'type' => 'textarea', 'default' => sprintf( __( '%s - Powered by WooCommerce', 'woocommerce' ), get_bloginfo( 'name', 'display' ) ), 'autoload' => false, 'desc_tip' => true, ),array( 'title' => __( 'Base color', 'woocommerce' ), 'desc' => sprintf( __( 'The base color for WooCommerce email templates. Default %s.', 'woocommerce' ), '#96588a' ), 'id' => 'woocommerce_email_base_color', 'type' => 'color', 'css' => 'width:6em;', 'default' => '#96588a', 'autoload' => false, 'desc_tip' => true, ),array( 'title' => __( 'Background color', 'woocommerce' ), 'desc' => sprintf( __( 'The background color for WooCommerce email templates. Default %s.', 'woocommerce' ), '#f7f7f7' ), 'id' => 'woocommerce_email_background_color', 'type' => 'color', 'css' => 'width:6em;', 'default' => '#f7f7f7', 'autoload' => false, 'desc_tip' => true, ),array( 'title' => __( 'Body background color', 'woocommerce' ), 'desc' => sprintf( __( 'The main body background color. Default %s.', 'woocommerce' ), '#ffffff' ), 'id' => 'woocommerce_email_body_background_color', 'type' => 'color', 'css' => 'width:6em;', 'default' => '#ffffff', 'autoload' => false, 'desc_tip' => true, ),array( 'title' => __( 'Body text color', 'woocommerce' ), 'desc' => sprintf( __( 'The main body text color. Default %s.', 'woocommerce' ), '#3c3c3c' ), 'id' => 'woocommerce_email_text_color', 'type' => 'color', 'css' => 'width:6em;', 'default' => '#3c3c3c', 'autoload' => false, 'desc_tip' => true, ),array( 'type' => 'sectionend', 'id' => 'email_template_options' ),)
The array.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'woocommerce_email_settings', $var ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_email_settings callback 
  2. function filter_woocommerce_email_settings( $var ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_email_settings', 'filter_woocommerce_email_settings', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_email_settings', 'filter_woocommerce_email_settings', 10, 1 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/admin/settings/class-wc-settings-emails.php  
  1. $settings = apply_filters( 'woocommerce_email_settings', array(