Home Forums WoodMart support forum Division by zero Reply To: Division by zero

#185363

Artem Temos
Keymaster

Try to add the following PHP code snippet to the child theme functions.php file to fix this

function woodmart_get_placeholder_size( $x0, $y0 ) {
   if ( !$y0 ) {
      $y0 = $x0;
   }
   $x = $y = 10;
   if( $x0 < $y0) {
      $y = ($x * $y0) / $x0;
   }
   if( $x0 > $y0) {
      $x = ($y * $x0) / $y0;
   }
   $x = ceil( $x );
   $y = ceil( $y );
   return (int) $x . 'x' . (int) $y;
}