add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) { if ( 'Read more' == $text ) { $text = __( 'Out of Stock', 'woocommerce' ); } return $text; } );After add the above code, Button text change to "Out of Stock" rather than Read More for Simple Products when out of stock. Preview
How to change the “Read More” button text to “Out of Stock” – WooCommerce
By default WooCommerce does display the "Read More" for all out of stock products. If you want to change the "Read More" button text to "Out of Stock" then you can do it easily by following the WooCommerce hooks functions even you have not any coding knowledge. You will only require to add below code in your theme function.php file and save the file.