I need help with button behavior

I have a website that on the ID dynamic page, I have buttons with different functions, but there is only one function I am not getting well how to go about it. I want a button to hide and only be appearing once in a week to the user. please help with this code

Hi,
Could you please clarify the button’s behaviour? Do you want to show the button only if it is a specific day like sunday? or should it be a week since the last time that the user clicked the button?

Yes the later, once user clicks on it, it should hide and appear the next week

Hello @Or, please respond if you have any idea about what am requesting