Site logo

Archived topic

Woocommerce Review Rating Star Problem

10 replies · Started by Leon on April 30, 2018

Viewing posts 1–11 of 11

Hello Tom,

I'm using woocommerce and some other plugins for woocommerce.

The rating stars do not show correctly. Please see below pictures. It looks like it's either the theme or GPP that's causing the problem as when I switch to another theme (astra), it works fine.

https://ibb.co/igiujH
https://ibb.co/iBVeJc

Could you please help?

Thank you
Leon

Is there a specific page where I can see this happening?

By default, it should look like this: https://gpsites.co/seller/

There must be some sort of CSS or plugin conflict.

None of the WooCommerce CSS is loading. Can you try deactivating Autoptimize while we debug?

Hi Tom,

It's deactivated. And no caching plugin is used now. Just a bit more information: I've used WP super cache and WP rocket separately a few days ago. However, I never kept both activated at the same time.

Thank you for helping me check.

Best regards
Leon

Hi Tom,

I also noticed that for my two buttons in header widget, Post a Job and Quick Recommend, they show weird on all woocommerce product category pages (you can click any of the five from the primary nav), but on other pages, they show up fine (I added some css using your simple css plugin), like the review or blog...

Thanks again
Leon

Ok, it looks like the issue is that the core WooCommerce styles aren't loading from their plugin.

Can you try deactivating the WC Frontend Manager plugin? Perhaps it's removing their default CSS?

Hi Tom,

I deactivated it, but looks like the problem is still there. Wierd.

I wrote to them also and they said that it's most probably because of caching plugins that could've removed the core file from woocommerce. So far, I've only used WP super cache and WP rocket. I didn't have good luck with these plugins yet. Do you think it's possible? If they removed some file, do I have to delete woocommerce and reinstall it, in that case I might lose some existing data...

Thank you
Leon

As long as the caching plugins are cleared and deactivated, they shouldn't be causing any issues.

Something is preventing those WooCommerce stylesheets from displaying - we just need to figure out what.

If you deactivate all of your plugins excerpt GP Premium, does the issue remain?

Is there any server caching going on?

Tom,

I wanna say SORRY for taking you time and effort helping me solve this problem. Now I want to slap myself in the face.

For some reason, I added the following code to my child theme's function.php a few days ago with the hope of optimizing my site, as when I checked on gtmetrix, something like this always slows down my site: wc-ajax=get_refreshed_fragments.

/** Disable All WooCommerce  Styles and Scripts Except Shop Pages*/
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_styles_scripts', 99 );
function dequeue_woocommerce_styles_scripts() {
if ( function_exists( 'is_woocommerce' ) ) {
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
# Styles
wp_dequeue_style( 'woocommerce-general' );
wp_dequeue_style( 'woocommerce-layout' );
wp_dequeue_style( 'woocommerce-smallscreen' );
wp_dequeue_style( 'woocommerce_frontend_styles' );
wp_dequeue_style( 'woocommerce_fancybox_styles' );
wp_dequeue_style( 'woocommerce_chosen_styles' );
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
# Scripts
wp_dequeue_script( 'wc_price_slider' );
wp_dequeue_script( 'wc-single-product' );
wp_dequeue_script( 'wc-add-to-cart' );
wp_dequeue_script( 'wc-cart-fragments' );
wp_dequeue_script( 'wc-checkout' );
wp_dequeue_script( 'wc-add-to-cart-variation' );
wp_dequeue_script( 'wc-single-product' );
wp_dequeue_script( 'wc-cart' );
wp_dequeue_script( 'wc-chosen' );
wp_dequeue_script( 'woocommerce' );
wp_dequeue_script( 'prettyPhoto' );
wp_dequeue_script( 'prettyPhoto-init' );
wp_dequeue_script( 'jquery-blockui' );
wp_dequeue_script( 'jquery-placeholder' );
wp_dequeue_script( 'fancybox' );
wp_dequeue_script( 'jqueryui' );
}
}
}

I found this code on github. Of course the problem is not the code (I thank the author for sharing that code)

It's my problem.

Since I'm using woocommerce dependent plugins like product filters etc. They may load woocommerce resources that are Dequeued! That's why. Now I deleted that code, and it's working as normal.

I apologize again.

Leon

No problem! Glad you got it working :)

This archived topic is closed to new replies.