I'd really appreciate some help if anyone knows the solution :)
I set up Product page template in Elementor Pro for Woocommerce product. I added a custom button there "Reserve now" (class .reserve-button) which opens a stripe payment form. I'd like to hide this button if the product is out of stock.
I've tried a dozen of different solutions and searched through lot of fourms, but Im really stuck :(
Here is one of them:
add_action( 'woocommerce_before_add_to_cart_button', function() {
global $product;
if ( !$product->is_in_stock() ) {?>
<style>
.reserve-button {
display: none;}
</style> <?php
}
});
Thank you in advance!