Support » Plugin: Judge.me Product Reviews for WooCommerce » Remove Judgeme preview badge and qa badge on product archive loop

  • Resolved oweibor

    (@oweibor)


    I just discovered judgeme ratings for woocommerce. Thank you for such an awesome plugin. The installation was a breeze, however the star rating and count is not properly placed on the shop archive loop of my theme, oceanwp.

    I have placed it at the bottom of the product archive loop (https://scentsng.com/shop) using the hooks guide of oceanwp

    add_action( 'ocean_after_archive_product_inner', array( 'JGM_Widget', 'judgeme_preview_badge' ), 5 );

    However, the actions below don’t seem to work on my theme.
    I also noticed the same issue in the single product page. Please, how I can remove the action on the archive loop?

    remove_action( 'woocommerce_single_product_summary', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    remove_action( 'woocommerce_after_shop_loop_item_title', array( 'JGM_Widget', 'judgeme_preview_badge' ), 5 ); //this didnt remove the judgeme_preview_badge

    remove_action( 'woocommerce_archive_description', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    remove_action( 'woocommerce_before_shop_loop_item', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    remove_action( 'woocommerce_shop_loop_item_title', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    remove_action( 'woocommerce_after_shop_loop_item_title', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    remove_action( 'woocommerce_after_shop_loop_item', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    remove_action( ‘woocommerce_after_shop_loop’, array( ‘JGM_Widget’, ‘judgeme_preview_badge’ ), 9 );

    remove_action( 'woocommerce_after_main_content', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    remove_action( 'woocommerce_before_main_content', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 ); //this didnt remove the judgeme_preview_badge

    None of the above hooks could remove the judgeme_preview_badge

    Also, I have activated question and answers on Judge.me, I’d like to know if there’s a function to disable the jdgm-qa-badge in the archive loop when there’s no question tied to the product? for now, I can use CSS to hide it completely, but I want it to display conditionally.

    .jdgm-qa-badge {
        display: none;
    }
    • This topic was modified 2 years, 3 months ago by oweibor.
    • This topic was modified 2 years, 3 months ago by oweibor.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author judgeme

    (@judgeme)

    Hello @oweibor and thank you for reaching out.

    You can remove our widgets with these codes:

    Review Widget on Product Page:
    remove_action( ‘woocommerce_after_single_product_summary’, array( ‘JGM_Widget’, ‘judgeme_review_widget’ ), 14 );

    Preview Badge on Product Page:
    remove_action( ‘woocommerce_single_product_summary’, array( ‘JGM_Widget’, ‘judgeme_preview_badge’ ), 9 );

    Preview Badge on Category Page:
    remove_action( ‘woocommerce_after_shop_loop_item_title’, array( ‘JGM_Widget’, ‘judgeme_preview_badge’ ), 5 );

    To hide the question badge if the questions are zero, try this CSS instead:
    .jdgm-prev-badge[data-number-of-questions=”0″] .jdgm-qa-badge {display: none;}

    • This reply was modified 2 years, 3 months ago by judgeme.
    Thread Starter oweibor

    (@oweibor)

    Thank you very much for your swift response. Unfortunately, the remove_action snippet below did not work when I added it to my functions.php file. The issue persists.

    remove_action( ‘woocommerce_after_single_product_summary’, array( ‘JGM_Widget’, ‘judgeme_review_widget’ ), 14 );

    remove_action( ‘woocommerce_single_product_summary’, array( ‘JGM_Widget’, ‘judgeme_preview_badge’ ), 9 );

    remove_action( ‘woocommerce_after_shop_loop_item_title’, array( ‘JGM_Widget’, ‘judgeme_preview_badge’ ), 5 );

    I know the problem isn’t from my theme because I added an action to the function.php code and it worked.

    also, the CSS code did not work when added to the styles.css file of my theme

    • This reply was modified 2 years, 3 months ago by oweibor.
    • This reply was modified 2 years, 3 months ago by oweibor.
    Thread Starter oweibor

    (@oweibor)

    Email Sent. Thank you… you guys have an incredibly amazing support.

    Plugin Author judgeme

    (@judgeme)

    Thank you.

    We’ve contacted you by email. Let us know if the solution works for you.

    The CSS code that I wrote before had a mistake in the quotation marks, as it seems that this forum is reformatting the marks, please just delete the marks in the previous code and write them again.

    • This reply was modified 2 years, 3 months ago by judgeme.
    • This reply was modified 2 years, 3 months ago by judgeme.
    Thread Starter oweibor

    (@oweibor)

    Thanks for your support on scentsng.com

    this code worked for me.

    add_action( 'init', function () {
    	
    	if (class_exists( 'JudgeMe' )) {    
    		add_action( 'init', 'jgm_remove_review_widget' );     
    		function jgm_remove_review_widget () {        
    			// Remove the default widget placement        
    			remove_action( 'woocommerce_after_single_product_summary', array( 'JGM_Widget', 'judgeme_review_widget' ), 14 );    
    		}
    
    		//Replace Original Woocommerce with Judge.me Widget
    		add_filter( 'woocommerce_product_tabs', 'jgm_add_review__widget_to_tab' );      
    		function jgm_add_review__widget_to_tab ($tabs) {         
    			$tabs['judgeme_reviews'] = array(            
    				'title' => __( 'Reviews', 'woocommerce' ),            
    				'priority' => 50,            
    				'callback' => array( 'JGM_Widget', 'judgeme_review_widget' )         
    			);          
    			return $tabs;     
    		} 
    		
    		
    		
    		//JGM REVIEW BADGE SINGLE PRODUCT
    		add_action( 'woocommerce_single_product_summary', 'jgm_remove_preview_badge' );     
    		function jgm_remove_preview_badge () {        
    			// Remove the default widget placement        
    			remove_action( 'woocommerce_single_product_summary', array( 'JGM_Widget', 'judgeme_preview_badge' ), 9 );  
    		}
    		
    		
    		//JGM REVIEW BADGE ARCHIVE LOOP & ADD IT DIRECTLY TO OCEANWP AFTER PRODUCT
    		remove_action( 'woocommerce_after_shop_loop_item_title', array( 'JGM_Widget', 'judgeme_preview_badge' ), 5 );
    		add_action( 'ocean_after_archive_product_inner', array( 'JGM_Widget', 'judgeme_preview_badge' ), 5 );
    		
    	}
    	
    } );
    
    • This reply was modified 2 years, 3 months ago by oweibor.
    Plugin Author judgeme

    (@judgeme)

    You’re welcome 🙂

    Don’t hesitate to contact our Customer Support again if you have any other question or issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Judgeme preview badge and qa badge on product archive loop’ is closed to new replies.