User add_filter('pdf_content_additional_content','woocommerce_pdf_invoice_new_labels',10,2); function woocommerce_pdf_invoice_new_labels( $content , $order_id){ $sign_img =''; $prescriber_id = get_post_meta($order_id,'_prescriber_id',true); $user_info = get_userdata($prescriber_id); $prescriber_name = isset($user_info->display_name) && $user_info->display_name!='' ? $user_info->display_name : $user_info->user_nicename; $prescriber_sign = get_user_meta($prescriber_id,'prescriber_signature',true); if($prescriber_sign){ $sign_url = wp_get_attachment_url($prescriber_sign); $sign_url = str_replace(site_url('/'),'',$sign_url); $sign_img =''; } $content = str_replace( '[[BILLING_FNAME]]', get_post_meta( $order_id,'_billing_first_name',TRUE ),$content); $content = str_replace( '[[BILLING_LNAME]]', get_post_meta( $order_id,'_billing_last_name',TRUE ),$content); $content = str_replace( '[[BILLING_DOB]]', […]