Remove links from the product titles in the wishlist items table

The titles of the products in the wishlist items table on the single wishlist page are usually clickable. This allows the customer to visit the product page to learn more about the product while purchasing it. It can also help boost alternative sales as well as S.E.O. for your site.

Sometimes however, you may want to prevent customers from being able to click these titles so that they can stay on the wishlist page and buy the product as a wishlist item.

In order to do so, simply add the code below to your functions.php file.

/**
 * Remove links from the product titles in the wishlist items table
 */
add_filter( 'nmgr_get_template_args', 'my_nmgr_remove_product_title_link' );

function my_nmgr_remove_product_title_link( $args ) {
	if ( 'account/items/item-title.php' === $args[ 'template_name' ] && is_nmgr_wishlist() ) {
		$args[ 'args' ][ 'product_link' ] = '';
	}
	return $args;
}