Sorry for the ambiguity. Yes, using woocommerce.
I’ve hacked into the code so many times and tried so many different things I’ve lost track of what I’ve tried so far.
Currently I’m working on a mod to the themes function.php file to see if that will work:
add_action( ‘woocommerce_checkout_update_order_meta’, ‘platoon_add_order_meta’, 10, 2 );
if(!empty($_SESSION[‘kioskID’])) $kID = “SESSION “.$_SESSION[‘kioskID’];
else $kID = “NoSessVar”;
function platoon_add_order_meta( $order_id, $posted ) {
update_post_meta( $order_id, ‘kioskIDPT’, $kID );
}
AND this mod:
add_filter( ‘woocommerce_new_order_data’ , ‘add_params_details_to_order’ );
// Our hooked in function – $fields is passed via the filter!
function add_params_details_to_order( $fields ) {
$fields[‘post_excerpt’] = $fields[‘post_excerpt’] . “\n ——————- \n kioskIDtest2: “.$_SESSION[‘kioskID’].” \n” . params_details(true);
return $fields;
}
Not sure if this is what I need, but it does append the kioskID to the customer email under the ‘notes’ section. But we need the business copy to include this as well – or possibly some better method?!