Fixed missing reviews for product_page shortcode with SKU
When quering with SKU, WP_Query does not set `is_single` as true and this makes fail the check inside `comments_template()`. Closes #16128
This commit is contained in:
parent
2e663af024
commit
e5ebfb6141
|
@ -731,6 +731,9 @@ class WC_Shortcodes {
|
|||
<?php
|
||||
}
|
||||
|
||||
// For "is_single" to always make load comments_template() for reviews.
|
||||
$single_product->is_single = true;
|
||||
|
||||
ob_start();
|
||||
|
||||
global $wp_query;
|
||||
|
|
Loading…
Reference in New Issue