Home › Forums › General › Syntax for updating data › Reply To: Syntax for updating data
March 30, 2020 at 5:56 pm
#70000
Gordian
Participant
This is my code inside class-employee.php, update employee function of hrm module.
//update user einformed if license_date was changed
if ( isset( $posted[‘license_date’] ) && $posted[‘license_date’] !== $this->erp_user->license_date ) {
$this->erp_user->update( [ ‘user_id’ => $this->user_id, ‘einformed’ => ‘no’ ] );
if ( is_wp_error( $result ) ) {
return $result;
}
}