Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter morvarghmatt

    (@morvarghmatt)

    Hi

    I’ve found where the drop down is populated in your code. ??

    I know it’s very bad practice to do so but I have edited your code in ‘/wp-content/plugins/erp/modules/hrm/includes/functions-employee.php’ and added the entry ‘volunteer’ to the following:

    function erp_hr_get_employee_types() {
    $types = array(
    ‘volunteer’ => __( ‘Volunteer’, ‘erp’ ),
    ‘permanent’ => __( ‘Full Time’, ‘erp’ ),
    ‘parttime’ => __( ‘Part Time’, ‘erp’ ),
    ‘contract’ => __( ‘On Contract’, ‘erp’ ),
    ‘temporary’ => __( ‘Temporary’, ‘erp’ ),
    ‘trainee’ => __( ‘Trainee’, ‘erp’ )
    );

    Is there a better way for me to do this and not have to make the change if the plugin is updated?

    Thanks in advance for any pointers

    Regards

    Matt

    Use ‘erp_hr_employee_types’ filter hook to add your custom types. Checkout this example: https://gist.github.com/ediamin/1da58031125e89fd906cae2a804055b8

    Thread Starter morvarghmatt

    (@morvarghmatt)

    Thats great thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Employee Type’ is closed to new replies.