Got it!
I needed to add this line:
if ( $other_details = get_post_meta( $order->id, 'Other Details', true ) ) {
So the full code for the block I needed to change would be:
/**
* Add the fields to order confirmation/thank you page.
**/
add_action( 'woocommerce_order_details_after_order_table', "my_woocommerce_other_details_after_order_table", 10, 1 );
function my_woocommerce_other_details_after_order_table( $order ) {
if ($other_details = get_post_meta( $order->id, 'Other Details', true ) ) {
echo '<p><strong>'.__('Other Details').':</strong> ' . get_post_meta( $order->id, 'Other Details', true ) . '</p>';
}
}
Related Posts:
- How to access custom order item meta data from a meta key in WooCommerce?
- Save Custom Fields for Variations Product
- Adding existing user custom field value to a woocommerce product [closed]
- Adding Custom Text Area to WooCommerce Product
- WooCommerce conditional required checkout fields [closed]
- Include woocommerce custom field value in front-end search result
- woocommerce product custom field
- How to get customfield value by woocommerce product ID
- Conditionally hide or show woocommerce product variation in fontend by custom field
- Woocommerce: Custom fields and email shortcodes, ec_custom_field
- Bulk remove post meta
- How to create html block to display extra information on woocommerce single product page
- Display WP-Types custom fields in post [closed]
- Modifying custom order item meta from admin order view
- How to create a dropdown select of all items in an ACF field group
- How do I add an image upload, custom field to a WooCommerce product?
- WooCommerce – Adding Custom Fields To Invoice
- Woocommerce Product Custom Select List (not variation)
- jQuery – Automatic event trigger does not **really** check my form
- How to add new field to the account address?
- How to display custom field in woocommerce email orders? [closed]
- Woocommerce Retrieving custom field value from orders
- Update custom field values on edit address page woocommerce
- Woocommerce frontend edit custom fields
- Is it possible to add Term Meta Fields to a WooCommerce Attribute?
- Why does my numeric meta query work only on one meta key and not the other?
- Update custom field on the fly
- (woocommerce) How to get product id form order id & then retrieve custom meta linked to product?
- How to delete WooCommerce Products than have a specific custom field?
- WooCommerce 3 get custom variation on process order [closed]
- How to save array option as text and not integer?
- Use a different catalog image than the featured image
- Check if value exists before saving
- Add Custom field under the post title [closed]
- woocommerce how in checkout to add my custom field check box, and when i check it hide the shipping adress and add tax 19% [closed]
- price calculation from custom field (woocommerce) [closed]
- Cannot save values to custom fields for variations on Woocommerce 2.4.6
- Send checkout page custom field in order email
- Extract array from custom field
- Assign class to Drop Down Selections in WooCommerce Products Custom Fields
- Underscores in custom fields
- Add custom field to the archive page?
- Show only posts which can be commented OR have custom meta field
- Need small coding with Custom Fields Search
- get_post_meta() unserialize issue – returns boolean(false)
- How can I remove fields in the attachment editor?
- Edit Custom Database Tables in WordPress
- How to store the value of a custom field dropdown select for post referencing?
- Change content before writing to database
- post meta data clearing on autosave
- WordPress Search Custom Meta Field Only
- Add description text under input field for new profile fields
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Echo values from custom field outside loop php
- How to add content at the end of posts?
- Transfer self made functions.php custom fields to Advanced Custom Fields [closed]
- wordpress custom fields multiple data
- How do I define post titles as images using Custom Fields?
- Woocommerce custom meta fields, sort by date
- Why the pagination for a query modified by pre_get_posts doesn’t mind the number & order of posts sorted & selected based on a custom date time field
- Trying to update_post_meta function
- How do i add custom fields to my themes template file?
- Custom Field to a Role?
- Ordering posts by custom field named “date” in backend
- How to pass page as an argument like post in WordPress?
- WordPress Media Uploader custom Javascript not working
- Custom fields issue [closed]
- Select custom posts by meta_value and sort by a different meta value
- Front end register with custom fields
- Display custom field from the front page on another page
- Display custom widget value in header.php
- Gravity Forms Update post meta from template [closed]
- Automatic linking terms
- Adding extra fields to front end signup form
- Problem uploading different files as custom fields with front end post form
- How to change order of posts in admin
- make a dropdown custom field with ‘cities’ list in it
- How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?
- Conditionally run function based on custom meta value?
- Get Custom Field Name ( Label or Key ) Not Value
- Custom field on Quick Edit using select/dropdown – almost working right but not showing currently selected value
- Adding Custom Metadata to my Archive/Posts page
- Move the post title to another field
- Ordering by ACF custom field vaule
- add different custom fields value to post class if permalink or index
- Create Shortcode shows only posts with custom_field meta
- Login_form add to top of form rather then bottom
- Advanced Custom Fields from Category – IF statement
- Get a different meta value with ajax when different elements are clicked
- Delete custom fields on post publish?
- Permalink structure depending on custom field
- How to add custom_fields value in JSON API using create_post
- Using Hooks. Thematic
- WP Post Meta Box Field Not Showing Updated Field
- Parse Shortcodes in Theme’s Custom Field?
- Update field name without losing the value
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- How can i put a custom field inside this php
- Save And Display Mp3 Audio files on WooCommerce product page with Dokan
- How to add an ACF only for parent term?