In woocommerce I have changed the add to cart button redirect to add to checkout page.
When some products are out of stock in categories or homepage the add to checkout button misses the content icon.
How Can I change the color of the button using php and disable it for button pressed event
Shall I use something like:
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_stock', 10 );
function woocommerce_template_loop_stock() {
global $product;
if ( ! $product->managing_stock() && ! $product->is_in_stock() )
echo '<p class="stock out-of-stock">Out of Stock</p>';
}
But I am a bit confused