コンテンツへスキップ サイドバーへスキップ

Waiting for author

Topic Tags: Compatibility

Overview of the issue

If you use the shortcode to display reviews on product pages from Customer Reviews for WooCommerce plugin in conjunction with the Show reviews in all languages option in WooCommerce > WooCommerce Multilingual > Settings page, you may encounter an issue where reviews are not visible on translated versions of products.

Workaround

Please, make sure of having a full backup of your site before proceeding.

  • Open …/wp-content/plugins/customer-reviews-woocommerce/includes/blocks/class-cr-reviews-grid.php file.
  • Look for line 148.
  • After this block of code:
    			$args = array(
    				'status'      => 'approve',
    				'post_type'   => 'product',
    				'meta_key'    => 'rating',
    				'orderby'     => $order_by,
    				'post__in'    => $post_ids,
    				'comment__not_in' => $comment__not_in
    			);
    
  • Add this:
    			if (is_array($args['post__in']) && count($args['post__in']) === 1) {
    				$args['post_id'] = array_shift($args['post__in']);
    				unset($args['post__in']);
    			}
    

2件の返信 に対して “Customer Reviews for WooCommerce - Shortcode Reviews Not Displaying on Translated Products”

  1. This compatibility issue was resolved in the version 5.76.1 of Customer Reviews for WooCommerce plugin.

返信を投稿

他の人に対してトピックに沿った礼儀正しい対応をお願いします。この投稿に関連しない問題についてサポートが必要な場合は、サポートフォーラムを使用してチャットを開始するか、チケットを送信してください。

次のタグが使用できます:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>