2016-03-07 15:33:44 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The template to display the reviewers meta data (name, verified owner, review date)
|
|
|
|
*
|
2017-06-29 09:26:28 +00:00
|
|
|
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/review-meta.php.
|
2016-03-07 15:33:44 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2016-07-19 10:30:31 +00:00
|
|
|
* @see https://docs.woocommerce.com/document/template-structure/
|
2016-03-07 15:33:44 +00:00
|
|
|
* @package WooCommerce/Templates
|
2018-03-28 17:30:43 +00:00
|
|
|
* @version 3.4.0
|
2016-03-07 15:33:44 +00:00
|
|
|
*/
|
|
|
|
|
2018-03-28 17:30:43 +00:00
|
|
|
defined( 'ABSPATH' ) || exit;
|
2016-03-07 15:33:44 +00:00
|
|
|
|
|
|
|
global $comment;
|
|
|
|
$verified = wc_review_is_from_verified_owner( $comment->comment_ID );
|
|
|
|
|
|
|
|
if ( '0' === $comment->comment_approved ) { ?>
|
|
|
|
|
2018-03-26 17:37:44 +00:00
|
|
|
<p class="meta">
|
|
|
|
<em class="woocommerce-review__awaiting-approval">
|
|
|
|
<?php esc_html_e( 'Your review is awaiting approval', 'woocommerce' ); ?>
|
|
|
|
</em>
|
|
|
|
</p>
|
2016-03-07 15:33:44 +00:00
|
|
|
|
|
|
|
<?php } else { ?>
|
|
|
|
|
|
|
|
<p class="meta">
|
2018-03-28 17:30:43 +00:00
|
|
|
<strong class="woocommerce-review__author"><?php comment_author(); ?> </strong>
|
|
|
|
<?php
|
2016-03-07 15:33:44 +00:00
|
|
|
if ( 'yes' === get_option( 'woocommerce_review_rating_verification_label' ) && $verified ) {
|
2016-08-05 13:41:02 +00:00
|
|
|
echo '<em class="woocommerce-review__verified verified">(' . esc_attr__( 'verified owner', 'woocommerce' ) . ')</em> ';
|
2016-03-07 15:33:44 +00:00
|
|
|
}
|
|
|
|
|
2018-03-28 17:30:43 +00:00
|
|
|
?>
|
2018-03-28 17:32:51 +00:00
|
|
|
<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>
|
2016-03-07 15:33:44 +00:00
|
|
|
</p>
|
|
|
|
|
2018-03-28 17:30:43 +00:00
|
|
|
<?php
|
|
|
|
}
|