Support » Plugin: F4 Salutation Fields for WooCommerce » Request Salutation

  • Resolved iananderson


    I export my orders using WP All Export, and would like to include the Salutation field in my exported CSV file.
    How can I request the field in a PHP function? For example:
    function request_customer_title ($order) {
    $customer_title = get_post_meta($order, ‘_salutation’, true);
    return $customer_title;
    Thanks for your help,

Viewing 1 replies (of 1 total)
  • Plugin Author F4


    Hi @iananderson

    You can get the value (pretty similar to your example) with the following code:

    get_post_meta($order_id, '_billing_salutation', true)
    get_post_meta($order_id, '_shipping_salutation', true)

    That will get you the salutation codename. If you want the readable label, you could wrap the following method around the methods above:


    How that helps!

Viewing 1 replies (of 1 total)
  • The topic ‘Request Salutation’ is closed to new replies.