NooTheme Premium WordPress Theme › Forums › JobMonster › View Candidate Contact in new theme versions
- This topic has 4 replies, 2 voices, and was last updated 4 years, 5 months ago by Melanie.
-
AuthorPosts
-
4 years, 5 months ago #1195466
Hi,
I've recently updated from V4.4.4 to the very latest theme version and now none of the existing companies can view candidate contact details. I've spotted the change in the Product package and have assigned packages to view unlimited Resume and view unlimited candidate contact. Now companies buying a new package can see candidate contact, but existing companies with this package cannot. Is there a way to update existing orders to allow existing companies with package access to candidate contact, please?
Many thanks,
M
4 years, 5 months ago #1197318Sorry, for old Employer can't view resume, i will create custom code for you use to update package data. To do it, please BACKUP your site and data before getting into work then switch your site to use Jobmonster child theme, then add custom code in file functions.php of child theme.
Code:add_action( 'edit_user_profile', 'user_profile_package_view_resume_info'); add_action( 'show_user_profile', 'user_profile_package_view_resume_info'); function user_profile_package_view_resume_info($user){ $user_id = is_object( $user ) && isset( $user->ID ) ? $user->ID : 0; if(empty($user_id)){ return; } $package = Noo_Member::is_employer($user_id) ? jm_get_package_info($user_id) : null; if(empty($package)){ return; } ?> <h3>Employer Package Update View Resume</h3> <table class="form-table"> <tr> <th><label>Preview Package</label></th> <td> <?php foreach ($package as $key=>$value): echo $key.':'.$value.'<br/>'; endforeach; ?> </td> </tr> <tr> <th><label>Can View Resume</label></th> <td> <input name="_employer_package_can_view_resume" type="checkbox" value="1" <?php if (isset($package['can_view_resume']) && $package['can_view_resume'] == '1'){?> checked="checked" <?php }?>> </td> </tr> <tr> <th><label>View Resume Limit</label></th> <td> <input name="_employer_package_view_resume_limit" type="number" <?php if (isset($package['resume_view_limit'])){?> value="<?php echo esc_attr($package['resume_view_limit'])?>" <?php }?>> <p class="description">The maximum number of resumes this package allows employers to view, input -1 for unlimited.</p> </td> </tr> </table> <?php } add_action( 'personal_options_update', 'user_profile_package_view_resume_info_save'); add_action( 'edit_user_profile_update', 'user_profile_package_view_resume_info_save'); function user_profile_package_view_resume_info_save($user_id){ if( empty( $user_id ) || !Noo_Member::is_employer($user_id) ) { return; } $package = jm_get_package_info($user_id); if(empty($package)){ return; } if(isset($_POST['_employer_package_can_view_resume'])){ $package['can_view_resume'] = '1'; if(isset($_POST['_employer_package_view_resume_limit'])){ $package['resume_view_limit'] = intval($_POST['_employer_package_view_resume_limit']); } if(!metadata_exists('user',$user_id,'_resume_view_count') && !metadata_exists('user',$user_id,'_resume_view_expire')){ update_user_meta( $user_id, '_resume_view_count', '0' ); $resume_view_expire = isset( $package['expired'] ) ? absint( $package['expired'] ) : '-1'; update_user_meta( $user_id, '_resume_view_expire', $resume_view_expire ); } update_user_meta( $user_id, '_job_package', $package ); } }
After add custom code, please go to edit each old Employer you will see section like attachment and check to 'Can View Resume' setting to allow view resume and enter resume view limit.
After change package data of alll old Employer please remove custom code.
Best regards.
Attachments:
You must be logged in to view attached files.4 years, 5 months ago #1203728Thank you, this is great! 🙂
4 years, 5 months ago #1203910Yes, after update done, Please remove custom code on your site.
4 years, 5 months ago #1203983Have done, thank you! 🙂
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.