I am able to verify by viewing the "Application" tab in the dev tools that my session variable has carried over to the checkout page; and I have the WC hook setup that allows me to change the "default"/value of the field I want to insert data into.
However, I am unable to get them to read each other.
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
$fields['order']['order_comments']['label'] = "Custom Neon Details (If included)";
$fields['order']['order_comments']['default'] = $_SESSION["customtext"];
var_dump( $fields );
return $fields;
}
As you can see from the attached image, my session variable is present on that page. How now, do I get it to add that session variable to $fields['order']['order_comments']['default']?
Any help is appreciated! Thanks.
