-
-
Save klikdiva/e8769beb2c6d2654880935e5c3d1fb99 to your computer and use it in GitHub Desktop.
Change the word Products in the WooCommerce breadcrumb trail
This file contains hidden or 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
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