Skip to content

Instantly share code, notes, and snippets.

@codemonkey-jack
Last active December 12, 2017 20:01
Show Gist options
  • Save codemonkey-jack/d9948c86045f48d8339c00743474b471 to your computer and use it in GitHub Desktop.
Save codemonkey-jack/d9948c86045f48d8339c00743474b471 to your computer and use it in GitHub Desktop.
Changes the no products found text in WooCommerce
<?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