when product out of stock single page show notify woocommerce, i am doing this code but showing button only archive page, i want to show single page any one help for code https://i.stack.imgur.com/4EFd7.jpg
add_filter( 'woocommerce_loop_add_to_cart_link', 'filter_loop_add_to_cart_link', 20, 3 );
function filter_loop_add_to_cart_link( $button, $product, $args = array() ) {
if( $product->is_in_stock() ) return $button;
// HERE set your button text (when product is not on stock)
$button_text = __('Not available', 'woocommerce');
return sprintf( '<a class="button disabled" style="%s">%s</a>', $style, $button_text );
}