• I am trying to print the current user display name on an the bellow hook so when the specific user submit the form to auto print the user name as is the same with the brand name. How can i do this? Any help or other solution?

    Am trying also to print via shortcode but the taxonomy show only menu and hook with filter.

    add_filter('cf7_2_post_filter-product-pwb-brand','filter_product_pwb_brand',10,3);
    function filter_product_pwb_brand($value, $post_id, $form_data){
    //$value is the post field value to return, by default it is empty. If you are filtering a taxonomy you can return either slug/id/array.  in case of ids make sure to cast them integers.(see https://codex.www.ads-software.com/Function_Reference/wp_set_object_terms for more information.)
    //$post_id is the ID of the post to which the form values are being mapped to
    // $form_data is the submitted form data as an array of field-name=>value pairs
    return $value;
    }
  • The topic ‘print the current user display name’ is closed to new replies.