I really hope someone can help me. I have contacted ThemeIsle support and they don't provide support for custom code so I'm stuck.
I have a Wordpress site, using the Neve theme from ThemeIsle, which I am currently working on. I would like to change the tooltip text shown when the user hovers over the heart icon for a product on the page shop page at demo site
Currently it shows "Add to wishlist", i would like it to state "Add to favourites" . I can see there is a php file named \plugins\neve-pro-addon\includes\modules\woocommerce_booster\views\wish_list.php and this contains the function I'm looking to override:
<?php
/**
* Class that add wish list functionality
*
* @package Neve_Pro\Modules\Woocommerce_Booster\Views
*/
namespace Neve_Pro\Modules\Woocommerce_Booster\Views;
use HFG\Core\Components\Nav;
/**
* Class Wish_List
*
* @package Neve_Pro\Modules\Woocommerce_Booster\Views
*/
class Wish_List extends Abstract_Shop_Product {
...
...
/**
* Wish List button markup.
*/
public function add_wish_list_button() {
global $product;
$position = get_theme_mod( 'neve_wish_list', 'none' );
$icon_class = 'add-to-wl';
$product_id = $product->get_id();
$wish_list_label = apply_filters( 'neve_wish_list_label', __( 'Add to wishlist', 'neve' ) );
/* translators: %s - product title */
$title_sr = apply_filters( 'neve_sr_title', sprintf( __( 'Add %s to wishlist', 'neve' ), get_the_title() ) );
if ( $this->is_product_in_wishlist( $product_id ) ) {
$icon_class .= ' item-added';
}
echo '<div class="nv-wl-wrap ' . esc_attr( $position ) . '">';
echo '<a href="#" class="' . esc_attr( $icon_class ) . '" data-pid="' . esc_attr( $product_id ) . '" aria-label="' . esc_html( $title_sr ) . '">';
echo '<svg width="18" height="18" viewBox="0 0 512 512"><path xmlns="http://www.w3.org/2000/svg" fill="currentColor" d="M462.3 62.6C407.5 15.9 326 24.3 275.7 76.2L256 96.5l-19.7-20.3C186.1 24.3 104.5 15.9 49.7 62.6c-62.8 53.6-66.1 149.8-9.9 207.9l193.5 199.8c12.5 12.9 32.8 12.9 45.3 0l193.5-199.8c56.3-58.1 53-154.3-9.8-207.9z"/></svg>';
echo '<span class="tooltip tooltip-left">' . esc_html( $wish_list_label ) . '</span>';
echo '</a>';
echo '</div>';
}
...
...
}
I have created a child theme but I have no idea how or even if it is possible to override it. The child theme currently mirrors the layout of the theme itself whereas the NevePro plugin has a woocommerce_booster folder that seems to add all of the extra functionality. I've tried creating override files in various locations in my child but to no avail.
I'm very new to WP and any pointers would be extremely helpful.
Thank you.