• Resolved richardkalberg

    (@richardkalberg)


    Hi!

    We have been using your plugin for a while without issues to display product reviews slider on the product page. We have now cloned the site to a new domain and we have a few issues related to the plugin and possible some custom code.

    We have made a custom field with Meta Box underneath the product content to display the reviews for the product.
    Your shortcode [cusrev_all_reviews] works without problem on the cloned site but [cusrev_reviews_slider] does not show any products. It only states “No Product Reviews” and randomly it also breaks the product page. The [cusrev_reviews_slider] works well on the front page and this issues seems to be only on the product pages.

    We have tried to run in DEBUG mode but we are not catching any errors or error logs. We dont really understand what is happening at the moment.

    On the cloned site we can not see any product reviews in your plugin. (These show however on the other site). Picture: https://easyupload.io/rvisr1
    Seems to be something that is corrupt or missing? We have product reviews toggled on.

    The custom code we are using is this:

    functions.php

    add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
    
    ? $meta_boxes[] = [
    
    ? ? 'title' ? ? ?=> 'Extra Produkt Inst?llningar',
    
    ? ? 'post_types' => 'product',
    
    ? ? 'priority' ? => 'low',
    
    ? ? 'sanitize_callback' => 'none',
    
    ? ? 'fields' ? ? => [
    
    ? ? ? [
    
    ? ? ? ? 'type' ?=> 'heading',
    
    ? ? ? ? 'name' ?=> 'Produktinfo',
    
    ? ? ? ? 'desc' ?=> ''
    
    ? ? ? ],
    
    ? ? ? [
    
    ? ? ? ? 'name' => 'carousel_with_reviews',
    
    ? ? ? ? 'id' ? => 'carousel_with_reviews',
    
    ? ? ? ? 'type' => 'textarea',
    
    ? ? ? ? 'label_description' => 'M?ste vara en shortcode',
    
    ? ? ? ? 'desc' => '',
    
    ? ? ? ? 'std' => '',
    
    ? ? ? ],
    
    ? ? ],
    
    ? ];
    
    ? return $meta_boxes;
    
    } );

    content-single-product.php

    <div id="carousel_with_reviews">
    <?php
    	try {
    		$carousel_with_reviews = rwmb_get_value('carousel_with_reviews');
    		if (!empty($carousel_with_reviews)) {
    			echo do_shortcode($carousel_with_reviews);
    		}
    	} catch (Exception $e) {
    		echo 'Caught exception: ',  $e->getMessage(), "\n";
    	}
    	?>
    </div>
    
    
    
    
    <?php

    Really hope you can get som insight on this issue or if we are missing something. Thanks!

    Richard

  • The topic ‘Product reviews not showing and plugin breaking page’ is closed to new replies.