• Resolved Alec Weekes

    (@alec-weekes)


    Greetings,

    I’m trying to resolve a small issue with the use of this plugin. I’m wanting to adjust it so that the Email Subject comes with a Custom Field I have created included.

    I’ve found the subject line in class-wp-resume-manager-email-notification.php and already made adjustments. The issue is it’s not pulling in the custom field despite using the documentation that I have found here: https://plugins.smyl.es/docs-kb/output-custom-field-values-using-php/?v=79cba1185463

    Here is what I have so far:

    $subject = sprintf( __( 'New Resume Submission From %s - [%s]', 'wp-job-manager-resumes' ), $resume->post_title, the_custom_field( 'candidate_title' ));

    The candidate_title is the Meta Key shown in the Custom Fields UI, but isn’t pulling the data through. I have tried with these following edits too;

    $subject = sprintf( __( 'New Resume Submission From %s - [%s]', 'wp-job-manager-resumes' ), $resume->post_title, the_custom_field( 'candidate_title', $resume_id));

    $subject = sprintf( __( 'New Resume Submission From %s - [%s]', 'wp-job-manager-resumes' ), $resume->post_title, $resume->the_custom_field( 'candidate_title'));

    Any recommendations would be amazing.

    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Alec Weekes

    (@alec-weekes)

    Update

    This is the code I used to get it working, however, the issue was that behind the scenes on the manager, the “candidate_title” was disabled. Make sure if you’re having this issue that the field itself is enabled.

    I haven’t tested whether the documented versions work better, but it should be exactly the same.

    $title = get_post_meta( $resume_id, 'candidate_title', true );

    Then just used $title inside the Subject Line found in class-wp-resume-manager-email-notification.php, as seen here;

    $subject = sprintf( __( 'New Resume Submission From %s - [%s]', 'wp-job-manager-resumes' ), $resume->post_title, $title);

    Plugin Contributor jonryan

    (@jonryan)

    Thanks for updating this @alec-weekes. Glad you got it figured out!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Email Subject Line – Custom Fields’ is closed to new replies.