When you list your child products, the link to the original child product page is suppressed. You can re-enable it using this snippet:
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 | |
/** | |
* Add link to child product name | |
* Also removes price and separator from product name | |
*/ | |
function prefix_add_link_to_child_product_name( $title, $child_product ) { | |
$title = sprintf( | |
'<a style="pointer-events: auto" href="%s" target="%s">%s</a>', | |
get_permalink( $child_product->get_id() ), | |
apply_filters( 'pewc_child_product_title_target', '_blank' ), | |
get_the_title( $child_product->get_id() ) | |
); | |
return $title; | |
} | |
add_filter( 'pewc_child_product_title', 'prefix_add_link_to_child_product_name', 10, 2 ); |
Here’s how to add a snippet.