Support » Plugin: WooCommerce » verified owner

  • Resolved mag8891w

    (@mag8891w)


    Hi there

    does anyone know how I can change the default “verified owner” to say verified buyer instead for the woocommerce reviews when this setting is chosen.

    Best regards,
    Mag

Viewing 5 replies - 1 through 5 (of 5 total)
  • Mikey Arce

    (@mikeyarce)

    Automattic Happiness Engineer

    Hi @mag8891w,

    Yes! The easiest way to do this is using a translation plugin. I usually recommend Loco Translate:
    https://wordpress.org/plugins/loco-translate/

    You just need to translate into the same language your store is already in to change any wording you want.

    hello Mikey, thanks for your reply
    I have translated file plugins/woocommerce/i18n/languages/woocommerce-en_US.po but this doesn’t seem to change anything on the site?
    do I need to copy this file anywhere else?
    thank you

    hi sorry found that is was overriding by another plugin, so all woks now

    Mikey Arce

    (@mikeyarce)

    Automattic Happiness Engineer

    Awesome, glad that worked, @mag8891w!

    /home/xxxxxx.com/public_html/wp-content/plugins/woocommerce/templates/single-product/review-meta.php

    remove all code from review-meta.php
    add following Code to review-meta.php

    <?php
    /**
    * The template to display the reviewers meta data (name, verified owner, review date)
    *
    * This template can be overridden by copying it to yourtheme/woocommerce/single-product/review-meta.php.
    *
    * HOWEVER, on occasion WooCommerce will need to update template files and you
    * (the theme developer) will need to copy the new files to your theme to
    * maintain compatibility. We try to do this as little as possible, but it does
    * happen. When this occurs the version of the template file will be bumped and
    * the readme will list any important changes.
    *
    * @see https://docs.woocommerce.com/document/template-structure/
    * @package WooCommerce/Templates
    * @version 3.4.0
    */

    defined( ‘ABSPATH’ ) || exit;

    global $comment;
    $verified = wc_review_is_from_verified_owner( $comment->comment_ID );

    if ( ‘0’ === $comment->comment_approved ) { ?>

    <p class=”meta”>
    <em class=”woocommerce-review__awaiting-approval”>
    <?php esc_html_e( ‘Your review is awaiting approval’, ‘woocommerce’ ); ?>

    </p>

    <?php } else { ?>

    <p class=”meta”>
    <strong class=”woocommerce-review__author”><?php comment_author(); ?>
    <?php
    if ( ‘yes’ === get_option( ‘woocommerce_review_rating_verification_label’ ) && $verified ) {
    echo ‘<em class=”woocommerce-review__verified verified”>(‘ . esc_attr__( ‘verified buyer’, ‘woocommerce’ ) . ‘) ‘;
    }

    ?>
    <span class=”woocommerce-review__dash”>–</span> <time class=”woocommerce-review__published-date” datetime=”<?php echo esc_attr( get_comment_date( ‘c’ ) ); ?>”><?php echo esc_html( get_comment_date( wc_date_format() ) ); ?></time>
    </p>

    <?php
    }

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘verified owner’ is closed to new replies.