¿Por qué esto no funciona? Publico un fragmento de código:
function after_entry_created($entry_id, $form_id) {
global $imgpath;
[....]
imagepng($immagine, 'wp-content/themes/barberry-child/etichettePersonalizzate/DUBL/fronte/'.$date->format('d-m-Y--H-i-s').'__dubl.jpeg');
$filename = $date->format('d-m-Y--H-i-s').'__dubl.jpeg';
$GLOBALS['imgpath'] = 'https://' . $_SERVER['SERVER_NAME']. '/wp-content/themes/barberry-child/etichettePersonalizzate/DUBL/fronte/'.$filename;
return $imgpath;
}
add_action('woocommerce_after_cart_item_name', 'print_path');
function print_path() {
echo $GLOBALS['imgpath'];
}
.