ms_has_membership seems not be working

Hi,

I’m trying to show the buy button in a woocommerce just if the user is a membership one. I’m using ms_has_membership function but it seems not to be working.

Is this the correct function to do that?