Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save klikdiva/e8769beb2c6d2654880935e5c3d1fb99 to your computer and use it in GitHub Desktop.
Save klikdiva/e8769beb2c6d2654880935e5c3d1fb99 to your computer and use it in GitHub Desktop.
Change the word Products in the WooCommerce breadcrumb trail
add_filter( 'woo_breadcrumbs_trail', 'woo_custom_filter_breadcrumbs_trail', 10 );
function woo_custom_filter_breadcrumbs_trail ( $trail ) {
foreach ( $trail as $k => $v ) {
if ( strtolower( strip_tags( $v ) ) == 'products' ) {
$trail[$k] = 'Photos';
break;
}
}
return $trail;
} // End woo_custom_filter_breadcrumbs_trail()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment