Tell us what you are trying to do?
Hello
I'm setting up a content template for woocommerce products (as a catalog, no prices) and want to display existing customer reviews and star rating.
The star rating gets all messed up, both using wc native and toolset output.
The reviews do not show up at all: Tried adding both the toolset woo blocks reviews widget and also using the wpv-woo-reviews shortcode and the product tabs. They never show up. Tried changing the theme to 2021 but they keep not showing up.
Reviews exist and do show when using the default woocommerce product reviews block, but there is no way of dynamically assign the product, so can't use it in the content template.
Site and server setup is the same described in previous support tickets.
You can see an example here: enlace oculto
You can use the admin access I provided earlier.
I reviewed your ticket once more to see if I had missed anything in the description and you mentioned this. Reviews exist and do show when using the default woocommerce product reviews block, but there is no way of dynamically assign the product, so can't use it in the content template.
What do you mean by dynamically assign the product? Are you referring assigning the product to the template?
Also I did a test of the reviews block on a fresh site and the issue is not present there, what we are experiencing here is unique to your site only.
Hello Shane
Thank you for your reply.
There is clearly a problem with the toolset interoperation with woocommerce here, and it's been worsening every day.
For example now, when creating a content template for a product I can't access taxonomies, either product categories, custom taxonomies or attributes (see attached image).
The problem is this has been happening for a while and I'm losing toolset features every day, at the same time taxonomies disappear some custom fields "non-types" show up. It looks like toolset, as especially blocks is loosing all sync with woo and postmeta database, which may explain the sluggishness e server processor spykes.
Is there a way of "resynching" toolset with woo and postmeta?
I have some good news on this regarding the reviews block. It would appear that your comments are closed despite being set to open in your Discussion settings for wordpress.
Our 2nd tier team was able to identify 2 workarounds that can help to get this working again for you.
1. You will need to go to each individual product and allow comments. See Screenshot
2. You can use the code below to force the comments to be open for your products.
/**
* Force comments open on products
*/
add_filter( 'comments_open', 'ts_force_comments_open', 10, 2 );
function ts_force_comments_open( $open, $post_id ){
$post = get_post( $post_id );
if ( $post->post_type == 'product' )
{
$open = true;
}
return $open;
}
This can be added in your toolset custom code settings at Toolset -> Settings -> Custom Code. Just add the code and ensure that you've activated the snippet.
Thank you Shane.
I've been out for a couple of days but saw your replies and it worked, both the access to the taxonomies and fields using the errata, and the woo reviews using the code snippet you provides.
Thanks again and best regards