You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have this piece of code :
require_once get_template_directory().'/lib/php-barcode-generator/src/BarcodeGenerator.php';
require_once get_template_directory().'/lib/php-barcode-generator/src/BarcodeGeneratorHTML.php';
add_action( 'woocommerce_email_order_meta', 'aggiungi_codice_a_barre_email_conferma_ordine', 10, 3 );
function aggiungi_codice_a_barre_email_conferma_ordine( $order, $sent_to_admin, $plain_text ) {
$string = $order->get_order_number(); // Utilizza il numero dell'ordine come stringa per generare il codice a barre
$bar_code= genera_codice_a_barre( $stringa ); // Genera il codice a barre
$colli = $_POST['peso_colli'];
for ($i = 0; $i < count($colli); $i++){
if ($colli[$i]){ $stringa_per_codice_a_barre = $POST['codice_collo'.$i];
echo '
Bar code
';
echo $bar_code;
}
}
}
function genera_codice_a_barre( $string ) {
$generator = new Picqer\Barcode\BarcodeGeneratorHTML();
$bar_code= $generator->getBarcode($string, $generator::TYPE_CODE_39);
// Restituisci il codice a barre HTML
return $bar_code;
}
that generates the error : thrown in /home/devspedi/public_html/wp-content/themes/additrans/lib/php-barcode-generator/src/BarcodeGenerator.php on line 113.
The text was updated successfully, but these errors were encountered:
i have this piece of code :
require_once get_template_directory().'/lib/php-barcode-generator/src/BarcodeGenerator.php';
require_once get_template_directory().'/lib/php-barcode-generator/src/BarcodeGeneratorHTML.php';
add_action( 'woocommerce_email_order_meta', 'aggiungi_codice_a_barre_email_conferma_ordine', 10, 3 );
$stringa_per_codice_a_barre = $ POST['codice_collo'.$i];
function aggiungi_codice_a_barre_email_conferma_ordine( $order, $sent_to_admin, $plain_text ) {
$string = $order->get_order_number(); // Utilizza il numero dell'ordine come stringa per generare il codice a barre
$bar_code= genera_codice_a_barre( $stringa ); // Genera il codice a barre
$colli = $_POST['peso_colli'];
for ($i = 0; $i < count($colli); $i++){
if ($colli[$i]){
echo '
Bar code
';echo $bar_code;
}
}
}
function genera_codice_a_barre( $string ) {
$generator = new Picqer\Barcode\BarcodeGeneratorHTML();
$bar_code= $generator->getBarcode($string, $generator::TYPE_CODE_39);
// Restituisci il codice a barre HTML
return $bar_code;
}
that generates the error : thrown in /home/devspedi/public_html/wp-content/themes/additrans/lib/php-barcode-generator/src/BarcodeGenerator.php on line 113.
The text was updated successfully, but these errors were encountered: