I have found where in WooCommerce (WC) I can edit directly to get my desired result, which is editing the following function: https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-breadcrumb.php#L222
private function add_crumbs_product_tag() {
$current_term = $GLOBALS['wp_query']->get_queried_object();
$this->prepend_shop_page();
/* translators: %s: product tag */
$this->add_crumb( sprintf( __( 'My Edit: %s', 'woocommerce' ), $current_term->name ), get_term_link( $current_term, 'product_tag' ) );
}
Now I know that it is bad practice to directly edit the WC plugin, so I am looking for an alternative, so that when WC updates, the changes aren't overwritten.
Override Attempt
I have tried to add my edited class to my child theme (mytheme-child/woocommerce/includes/class-wc-breadcrumb.php) but this doesn't seem to work.
What can I do?