Skip to content

Commit

Permalink
Fixed fatal error on cart page if not all translations are available (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
decarvalhoaa committed Jul 6, 2016
1 parent 9d715e0 commit c8ce91c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hyyan/WPI/Cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function translate_cart_item_permalink( $item_permalink, $cart_item ) {
If ( $cart_variation_id !== 0 ) {
// Variation
$variation_translation = $this->get_variation_translation( $cart_variation_id );
return $variation_translation->get_permalink();
return $variation_translation ? $variation_translation->get_permalink() : $item_permalink;
}

return $item_permalink;
Expand Down

0 comments on commit c8ce91c

Please sign in to comment.