add-to-cart
3 years ago
tabs
5 years ago
meta.php
5 years ago
photoswipe.php
5 years ago
price.php
5 years ago
product-attributes.php
5 years ago
product-image.php
5 years ago
product-thumbnails.php
5 years ago
rating.php
5 years ago
related.php
5 years ago
review-meta.php
5 years ago
review-rating.php
5 years ago
review.php
5 years ago
sale-flash.php
5 years ago
share.php
5 years ago
short-description.php
5 years ago
stock.php
5 years ago
title.php
5 years ago
up-sells.php
5 years ago
review-meta.php
46 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The template to display the reviewers meta data (name, verified owner, review date) |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/single-product/review-meta.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 3.4.0 |
| 16 | */ |
| 17 | |
| 18 | defined( 'ABSPATH' ) || exit; |
| 19 | |
| 20 | global $comment; |
| 21 | $verified = wc_review_is_from_verified_owner( $comment->comment_ID ); |
| 22 | |
| 23 | if ( '0' === $comment->comment_approved ) { ?> |
| 24 | |
| 25 | <p class="meta"> |
| 26 | <em class="woocommerce-review__awaiting-approval"> |
| 27 | <?php esc_html_e( 'Your review is awaiting approval', 'woocommerce' ); ?> |
| 28 | </em> |
| 29 | </p> |
| 30 | |
| 31 | <?php } else { ?> |
| 32 | |
| 33 | <p class="meta"> |
| 34 | <strong class="woocommerce-review__author"><?php comment_author(); ?> </strong> |
| 35 | <?php |
| 36 | if ( 'yes' === get_option( 'woocommerce_review_rating_verification_label' ) && $verified ) { |
| 37 | echo '<em class="woocommerce-review__verified verified">(' . esc_attr__( 'verified owner', 'woocommerce' ) . ')</em> '; |
| 38 | } |
| 39 | |
| 40 | ?> |
| 41 | <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> |
| 42 | </p> |
| 43 | |
| 44 | <?php |
| 45 | } |
| 46 |