How can I conditionally hide the checkout button without page refresh?

Hi, @flaquitqm .

You could achieve that using the AJAX Api for the cart.
https://shopify.dev/api/ajax/reference/cart