[Resolved] Display Only First Name

Home Support TWB Woocommerce Reviews Display Only First Name

This topic contains 1 reply, has 2 voices, and was last updated by  Abu 1 week, 4 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #8076


    Hi Abu, thanks for this awesome free plugin.

    I was just wondering if it is possible to only show the first name of the customer in the reviews?




    Thanks for using my plugin.

    Unfortunately you can’t do that unless by editing the core plugin file.

    Use the FTP program to go to wp-content/plugin/twb-woocommerce-reviews folder and edit the file ‘twb-output.php’.

    On line 154 replace this code echo'<div class="twb_wcr_author">' .get_comment_author($twb_wc_review). '</div>';

    with following:

    echo'<div class="twb_wcr_author">' .strtok(get_comment_author($twb_wc_review),' '). '</div>';

    Save the file and that should do the work.

    Please remember when in future if there’s a plugin update, this change will override.

    If any issue, let me know.



Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.