Viewing 2 replies - 1 through 2 (of 2 total)
  • huntsimply,
    You can change the truncate – but you will need to do it with a filter.

    Add the following to your functions.php file (or child theme functions.php if using a child theme) – AFTER the opening <?php tag or at the end of the file before the closing ?> tag:

    function change_reviews_truncate($items = array()){
    	if(is_array($items) && !empty($items)){
    		// change to your new truncate number below
    		$newTruncate = 200;
    		foreach($items as $asin => $product){
    			if(isset($product['CustomerReviews']) && $product['CustomerReviews'] != ''){
    				$items[$asin]['CustomerReviews'] = preg_replace("/\&truncate\=([0-9]*)\&/i","&truncate=".$newTruncate."&",$product['CustomerReviews'],1);
    			}
    		}
    	}
    	return $items;
    }
    add_filter('amazon_product_in_a_post_plugin_elements_filter','change_reviews_truncate',10,1);

    On the line with : $newTruncate = 200;
    change the number to what you want them to truncate at.

    That should fix it for you.
    Warm regards,
    Don

    Thread Starter huntsimply

    (@huntsimply)

    Dear Don,

    That’s amazing. Thanks very much for the quick help!

    Regards
    huntsimply

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Customer Reviews Truncated’ is closed to new replies.