[php] /* Change In Stock text in WooCommerce */ add_filter( 'woocommerce_get_availability', 'wcs_custom_get_availability', 1, 2); function wcs_custom_get_availability( $availability, $_product ) { // Change In Stock Text if ( $_product->is_in_stock() ) { $availability['availability'] = __('Available!', 'woocommerce'); } // Change Out of Stock Text if ( ! $_product->is_in_stock() ) { $availability['availability'] = __('Sold', 'woocommerce'); } return $availability; } [/php]
How to Change In Stock text in WooCommerce
Add the following PHP code to your child theme functions.php file.
Need help with this?
Hire me for a consultation and I'll walk you thru the process.
0 Comments