The Spanish tennis star, 38, has battled injuries over the past few year.