Hiding custom fields when content is empty [closed]
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 ) { … Read more