How can i fix my eval()'d code line:
Notice: Undefined variable: html in /var/www/vhosts/XXXXXXXX.it/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()'d code on line 5
Notice: Undefined variable: html2 in /var/www/vhosts/XXXXXXXX.it/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()'d code on line 6
Notice: Undefined variable: html3 in /var/www/vhosts/XXXXXXXX.it/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()'d code on line 7
Notice: Undefined variable: html4 in /var/www/vhosts/XXXXXXXX.it/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()'d code on line 8
Notice: Undefined variable: html5 in /var/www/vhosts/XXXXXXXX.it/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()'d code on line 9
Notice: Undefined variable: html6 in /var/www/vhosts/XXXXXXXX.it/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()'d code on line 19
Notice: Undefined variable: html6 in /var/www/vhosts/XXXXXXXX.it/httpdocs/wp-content/plugins/code-snippets/php/snippet-ops.php(469) : eval()'d code on line 21
------------------- CODE ---------------------
function tablepress_shortcode_function( $atts ) {
global $product;
$id_prodotto = $product->get_slug();
$html .= '[table id=' . $id_prodotto .' ]';
$html2 .= '[table id=' . $id_prodotto .'-2 ]';
$html3 .= '[table id=' . $id_prodotto .'-3 ]';
$html4 .= '[table id=' . $id_prodotto .'-4 ]';
$html5 .= '[table id=' . $id_prodotto .'-5 ]';
$html5 .= '[table id=' . $id_prodotto .'-6 ]';
if( $html ){
$html = '' . $html ;
}
if( $html ){$html = '<div class="vir-code-table">' . $html . '</div>';}
if( $html2 ){$html2 = '<div class="code-table">' . $html2 . '</div>';}
if( $html3 ){$html3 = '<div class="code-table">' . $html3 . '</div>' ;}
if( $html4 ){$html4 = '<div class="code-table">' . $html4 . '</div>' ;}
if( $html5 ){$html5 = '<div class="code-table">' . $html5 . '</div>' ;}
if( $html6 ){$html5 = '<div class="code-table">' . $html6 . '</div>' ;}
$tabelle = $html . $html2 . $html3 . $html4 . $html5 . $html6;
return $tabelle;
}
add_shortcode( 'tablepress_shortcode', 'tablepress_shortcode_function' );
Many TNX