Category Archives: Spiralps.ch

Fatal error in the bag

On spiralps.ch/shop, when viewing bag page there was a fatal error that pointed to missing get_permalink() on plugins/woocommerce-multilingual/inc/wc-string.class.php

So I commented actually the $title line:

[php]

function translated_cart_item_name($title, $values, $cart_item_key){

$parent = $values[‘data’]->post->post_parent;
if($values){
$tr_product_id = icl_object_id( $values[‘product_id’], ‘product’, true );
$title = get_the_title($tr_product_id);

if($parent){
$tr_parent = icl_object_id( $parent, ‘product’, true );
$title = get_the_title( $tr_parent ) . ‘ → ‘ . $title;
}

//echo "
";var_dump($values[‘data’]);echo "
";
//$title = sprintf( ‘<a href="%s">%s</a>’, $values[‘data’]->get_permalink(), $title );

}
return $title;
}

[/php]

and the problem seem to be solved