mythical
Forum Replies Created
-
I had the same and when deactivating Siteground optimizer all seems to be well.
This is the second time SG Optimizer has conflicted with another plugin.
Alan
Your plugin returns the Field Text not the value
Confirmation email returns the field text
Thanks for your time.
Hi
Thank-you very much for your time to replyI want to be able to have the radio button or checkbox Label to show “Table Three” on the checkout.
I then want the email to show the value “3” as a digit.
I do not have premium version yet as I was trying to get this to work.
Thanks
Alan
Thanks!
Alan
Sadly that does not help – it returns all the meta data fields not just the one I want.
E.G. I want to display the table number in one place on the email and I want to display the Special Notes (a text field) in another
The issue comes when it is either radio buttons or check boxes – the
<?php echo get_post_meta($order->id, ‘table_number’, true); ?>returns the label but not the value in the field.
This means I have to set them both as the same!
- This reply was modified 4 years, 5 months ago by mythical.
Changing the underscore to -> seems to work.
In a Radio button field this does return the ‘Option Value’ so that all seems fine.
Once the underscore thing was sorted the other thing that confused the issue was
In your ‘do action…’ that is added to the emails for a Radio button it returns the ‘Option Text’ (The Label)
This is also the case on your demo site which I checked to see if it was just me.
The text field works is returned properly – I haven’t tried any of the others.
I hope this information is helpful to you – I guess someone who knows very little sometimes views things a little differently.
Thank-you for your patience.
Alan
Ok I’m understanding a bit more that I did – However
<?php echo get_post_meta($order_id, ‘table_number’, true); ?>
Does not return anything.
<?php echo get_post_meta($order->id, ‘table_number’, true); ?>
That returns the files number but not the value in the field.
<?php do_action( ‘woocommerce_email_order_meta’, $order, $sent_to_admin, $plain_text, $email );?>
Returns the values and labels of all the extra fields created by me.I’m confused?
Alan
Hi
Thanks for the very prompt and helpful reply.I guess I need to try and find out the id of the field and replace the “id”
like this if the id was 17.
<?php echo get_post_meta($order_17, ‘table_number’, true); ?>
I did find this (which worked) in the template, I guess it fetches everything (I don’t know what the variables are).
<?php do_action( ‘woocommerce_email_order_meta’, $order, $sent_to_admin, $plain_text, $email );?>
Really appreciate the help
thanks again!
AlanI am trying to get one of the fields to appear at the top of email body but I cant get the code above to work.
I am not a coder and do not know the rest of the code that would go around the above to make it work. The field name is: table_number
Sorry but I’m 69 and when I was a young man the cutting edge was a digital watch with two buttons so I do stumble a bit
I have messaged Kadence and they replied that they would be very happy for you to reach out to them.