Last active
December 12, 2017 20:01
-
-
Save codemonkey-jack/d9948c86045f48d8339c00743474b471 to your computer and use it in GitHub Desktop.
Changes the no products found text in WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function x_no_products_found_text( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'No products were found matching your selection.' : | |
$translated_text = __( 'Your Custom Text here', 'woocommerce' ); | |
break; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'x_no_products_found_text', 20, 3 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment