There are times you don’t want to translate the whole installation of WordPress or one of its plugins such as WooCommerce. Here’s a little line of code which will work for you instantly.
add_filter( 'gettext', function($translated) { $translated = str_ireplace( '(can be backordered)', '', $translated ); return $translated; } , 999 );
Raj
August 12, 2020Can you explain more about what this snippet will do?
The way I read your title, i thought it was going to be a snippet that will allow me to change some text that appears somewhere on WP/Woo?