F4 WooCommerce Salutation Fields

plugin banner

Adds salutation fields to the WooCommerce billing and shipping address.

Author:FAKTOR VIER (profile at wordpress.org)
WordPress version required:5.0
WordPress version tested:5.8
Plugin version:1.0.11
Added to WordPress repository:05-12-2018
Last updated:19-07-2021
Rating, %:100
Rated by:3
Plugin URI:https://github.com/faktorvier/f4-woocommerce-...
Total downloads:2 112
Active installs:200+
plugin download
Click to start download

F4 Salutation Fields for WooCommerce adds a dropdown menu (more field types coming soon) to select the address salutation to the billing and/or shipping address.
The plugin prepends the salutation automatically before the name in every formatted address output. Here are a few more things the plugin does:

  • Adds salutation fields to the billing and/or shipping address checkout form
  • Adds salutation fields to the edit billing and/or shipping address dashboard and form
  • Adds salutation fields to the edit order backend page
  • Shows salutation fields in privacy data export
  • Erases salutation data if privacy erase is requested
  • Shows salutation field in orders (thank you page, email etc.)

Currently only Mr. and Mrs. are shown in the salutation field. If you want to add more or translate this values, see the code snippet below.

Usage

This plugin works out-of-the-box. By default, both salutation fields for billing and shipping are enabled and marked as required.
You can change the settings for both fields on the Accounts & Privacy screen in your WooCommerce settings. Both fields you can hide or set to optional/required.

If you want to add more salutations, change the labels or add your own translations, you can use this hook:

add_filter('F4/WCSF/get_salutation_options', function($options, $settings) {
    // Change label
    $options['mr'] = 'Mister';

    // Add new labels
    $options['dr'] = 'Dr.';
    $options['prof'] = 'Prof.';

    return $options;
}, 10, 2);

Features overview

  • Adds salutation fields
  • Works without configuration
  • Can be configurated for both fields
  • Easy to use
  • Lightweight and optimized
  • 100% free!

Planned features

  • Full integration into API and REST
  • More field types than select
  • Easy to configure and add own options

Screenshots
ChangeLog